This commit is contained in:
asyncnomi 2023-01-10 09:57:48 +01:00
parent 932d035cd8
commit d8745e4e07

View file

@ -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) {