added read-only mode + visual improvements

This commit is contained in:
daniel31x13
2024-07-16 20:33:33 -04:00
parent 6d30912812
commit 9c5226ee51
25 changed files with 172 additions and 16 deletions
+6
View File
@@ -11,6 +11,12 @@ export default async function tokens(
if (!user) return;
if (req.method === "POST") {
if (process.env.DEMO_MODE === "true")
return res.status(400).json({
response:
"This action is disabled because this is a read-only demo of Linkwarden.",
});
const token = await postToken(JSON.parse(req.body), user.id);
return res.status(token.status).json({ response: token.response });
} else if (req.method === "GET") {