Add tests for inviteController

This commit is contained in:
Alex Holliday committed 2024-10-11 12:42:46 +08:00
1 parent e052adfd91
commit 4ce08e05df
4 files changed
+209 -17

No files matched your search

+2 -2
View File
@@ -10,8 +10,8 @@ const { start } = require("repl");
const roleValidatior = (role) => (value, helpers) => {
const hasRole = role.some((role) => value.includes(role));
if (!hasRole) {
throw new Joi.ValidationError(
`You do not have the required authorization. Required roles: ${roles.join(", ")}`
throw new joi.ValidationError(
`You do not have the required authorization. Required roles: ${role.join(", ")}`
);
}
return value;