mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 20:25:43 +00:00
Correct logging references
This commit is contained in:
@@ -36,7 +36,7 @@ router.post(
|
||||
!secret.secretValueIV ||
|
||||
!secret.secretValueTag
|
||||
) {
|
||||
throw new Error('secrets array must contain objects that conform to the Secret interface');
|
||||
throw new Error('secrets array must contain objects that have required secret properties');
|
||||
}
|
||||
}
|
||||
} else if (typeof value === 'object') {
|
||||
@@ -51,7 +51,7 @@ router.post(
|
||||
!value.secretValueIV ||
|
||||
!value.secretValueTag
|
||||
) {
|
||||
throw new Error('secrets array must contain objects that conform to the Secret interface');
|
||||
throw new Error('secrets object is missing required secret properties');
|
||||
}
|
||||
} else {
|
||||
throw new Error('secrets must be an object or an array of objects')
|
||||
@@ -87,8 +87,6 @@ router.get(
|
||||
|
||||
router.patch(
|
||||
'/',
|
||||
body('workspaceId').exists().trim(),
|
||||
body('environment').exists().trim().isIn(['dev', 'staging', 'prod', 'test']),
|
||||
body('secrets')
|
||||
.exists()
|
||||
.custom((value) => {
|
||||
@@ -105,7 +103,7 @@ router.patch(
|
||||
!secret.secretValueIV ||
|
||||
!secret.secretValueTag
|
||||
) {
|
||||
throw new Error('secrets array must contain objects that conform to the Secret interface');
|
||||
throw new Error('secrets array must contain objects that have required secret properties');
|
||||
}
|
||||
}
|
||||
} else if (typeof value === 'object') {
|
||||
@@ -119,7 +117,7 @@ router.patch(
|
||||
!value.secretValueIV ||
|
||||
!value.secretValueTag
|
||||
) {
|
||||
throw new Error('secrets array must contain objects that conform to the Secret interface');
|
||||
throw new Error('secrets object is missing required secret properties');
|
||||
}
|
||||
} else {
|
||||
throw new Error('secrets must be an object or an array of objects')
|
||||
@@ -131,10 +129,6 @@ router.patch(
|
||||
requireAuth({
|
||||
acceptedAuthModes: ['jwt']
|
||||
}),
|
||||
requireWorkspaceAuth({
|
||||
acceptedRoles: [ADMIN, MEMBER],
|
||||
location: 'body'
|
||||
}),
|
||||
requireSecretsAuth({
|
||||
acceptedRoles: [ADMIN, MEMBER]
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user