admin schmadmin

This commit is contained in:
Flummi
2024-06-24 07:53:00 +02:00
parent 486580b21c
commit 2ff1842d09
11 changed files with 40 additions and 172 deletions

View File

@@ -139,7 +139,7 @@ export default router => {
// tags lol
group.put(/\/admin\/tags\/(?<tagname>.*)/, lib.auth, async (req, res) => {
group.put(/\/admin\/tags\/(?<tagname>.*)/, lib.loggedin, async (req, res) => {
if(!req.params.tagname || !req.post.newtag) {
return res.json({
success: false,
@@ -187,7 +187,7 @@ export default router => {
return res.json(q, tagname === newtag ? 200 : 201); // created (modified)
});
group.get(/\/admin\/tags\/suggest$/, lib.auth, async (req, res) => {
group.get(/\/admin\/tags\/suggest$/, lib.loggedin, async (req, res) => {
const reply = {
success: false,
suggestions: {}
@@ -267,7 +267,7 @@ export default router => {
});
});
group.post(/\/admin\/togglefav$/, lib.auth, async (req, res) => {
group.post(/\/admin\/togglefav$/, lib.loggedin, async (req, res) => {
const postid = +req.post.postid;
let favs = await db`