1
0
Fork 0

chore(org): Linter

This commit is contained in:
joostdecock 2023-02-26 16:19:31 +01:00
parent 8519c0fc52
commit 201ab1e4ca
2 changed files with 1 additions and 4 deletions

View file

@ -14,7 +14,7 @@ export function SetModel(tools) {
SetModel.prototype.guardedCreate = async function ({ body, user }) {
if (user.level < 3) return this.setResponse(403, 'insufficientAccessLevel')
if (Object.keys(body) < 1) return this.setResponse(400, 'postBodyMissing')
if (Object.keys(body).length < 1) return this.setResponse(400, 'postBodyMissing')
if (!body.name || typeof body.name !== 'string') return this.setResponse(400, 'nameMissing')
// Prepare data