Render login if cant find user

This commit is contained in:
MrFry 2020-04-03 09:37:18 +02:00
parent c540544e15
commit feb9eab5ad
2 changed files with 14 additions and 6 deletions

View file

@ -58,6 +58,13 @@ function CreateDB () {
const tableData = dbStruct[tableName]
dbtools.CreateTable(authDB, tableName, tableData.tableStruct)
})
// dbtools.Insert(authDB, 'users', {
// pw: 2,
// id: 1,
// notes: 'hemnlo'
// })
// console.log(dbtools.TableInfo(authDB, 'users'))
}
CreateDB()
@ -136,6 +143,7 @@ Load()
app.post('/login', (req, res) => {
logger.LogReq(req)
console.log(req.body)
// FIXME: redirect to original url
const user = 'u'
// TODO: get user