migration to postgresql

This commit is contained in:
Flummi
2022-01-02 06:52:47 +01:00
parent e1bc2c269a
commit e8ff4396aa
11 changed files with 571 additions and 280 deletions

View File

@@ -29,7 +29,7 @@ export default (router, tpl) => {
return res.reply({ body: "user doesn't exist or wrong password" });
if(!(await lib.verify(req.post.password, user[0].password)))
return res.reply({ body: "user doesn't exist or wrong password" });
const stamp = Date.now() / 1e3;
const stamp = ~~(Date.now() / 1e3);
const session = lib.md5(lib.createID());
await sql("user_sessions").insert({