Merge branch 'master' of git.rezo-rm.fr:BDEMetz/bde-liste
This commit is contained in:
commit
a39fbeb826
7
index.js
7
index.js
|
@ -167,6 +167,13 @@ fastify.post('/addPrank', async (request, reply) => {
|
||||||
let content = request.body;
|
let content = request.body;
|
||||||
let auth = checkAuthetification(content);
|
let auth = checkAuthetification(content);
|
||||||
if (auth.success) {
|
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) {
|
if ("type" in content) {
|
||||||
let prankUid = makeid(16);
|
let prankUid = makeid(16);
|
||||||
if ("prankUid" in content) {
|
if ("prankUid" in content) {
|
||||||
|
|
Loading…
Reference in a new issue