backend stuff lol

This commit is contained in:
Flummi
2021-12-18 19:52:38 +01:00
parent adb4f18a7f
commit d5eada1814
5 changed files with 87 additions and 31 deletions

View File

@@ -19,7 +19,7 @@ export default (router, tpl) => {
if(req.cookies.session)
return res.reply({ body: "du bist schon eingeloggt lol" });
res.reply({
body: tpl.render("login")
body: tpl.render("login", { theme: req.cookies.theme ?? "f0ck" })
});
});
@@ -103,7 +103,7 @@ export default (router, tpl) => {
.select("items.id", "items.username", "tags.tag")
.leftJoin("tags_assign", "tags_assign.tag_id", "tags.id")
.leftJoin("items", "items.id", "tags_assign.item_id")
.where("tags.tag", "regexp", tag);
.where("tags.tag", "like", '%'+tag+'%');
ret = search(rows, tag);
}