fix: open graph tags for production (uffa)

This commit is contained in:
2023-01-11 20:38:49 +01:00
parent d6fbbde329
commit 71280fba5c
4 changed files with 35 additions and 16 deletions
+1 -1
View File
@@ -179,7 +179,7 @@ export async function createApiRouter() {
}
// uno studente può modificare solo il campo "content"
if (user.role === 'moderator' && !validateObjectKeys<keyof ProblemModel>(req.body, ['content'])) {
if (user.role === 'moderator' && !validateObjectKeys<keyof ProblemModel>(req.body, ['title', 'content'])) {
res.status(StatusCodes.UNAUTHORIZED)
res.send(`a moderator can only modify the field "content"`)
return