From d8745e4e07d685f267accef9f577c5d28025328c Mon Sep 17 00:00:00 2001 From: asyncnomi Date: Tue, 10 Jan 2023 09:57:48 +0100 Subject: [PATCH] bla --- index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.js b/index.js index f1e40e2..cdb0032 100644 --- a/index.js +++ b/index.js @@ -167,6 +167,13 @@ fastify.post('/addPrank', async (request, reply) => { let content = request.body; let auth = checkAuthetification(content); if (auth.success) { + if (ServiceState.state == "closed" + && !AdminUsersUid.includes(content.uid)) { + return { + success: false, + why: "The service is for now, closed" + } + } if ("type" in content) { let prankUid = makeid(16); if ("prankUid" in content) {