Remove accept statuses

This commit is contained in:
Tuan Dang
2023-01-04 21:14:25 +07:00
parent 58830eab79
commit 54676c630e
27 changed files with 65 additions and 157 deletions
+1 -5
View File
@@ -10,8 +10,6 @@ import { param, body } from 'express-validator';
import {
ADMIN,
MEMBER,
COMPLETED,
GRANTED
} from '../../variables';
import { serviceTokenDataController } from '../../controllers/v2';
@@ -30,7 +28,6 @@ router.post(
}),
requireWorkspaceAuth({
acceptedRoles: [ADMIN, MEMBER],
acceptedStatuses: [COMPLETED, GRANTED],
location: 'body'
}),
body('name').exists().trim(),
@@ -50,8 +47,7 @@ router.delete(
acceptedAuthModes: ['jwt']
}),
requireServiceTokenDataAuth({
acceptedRoles: [ADMIN, MEMBER],
acceptedStatuses: [COMPLETED, GRANTED],
acceptedRoles: [ADMIN, MEMBER]
}),
param('serviceTokenDataId').exists().trim(),
validateRequest,