feat: go greppy

This commit is contained in:
=
2025-10-10 00:09:48 +05:30
parent fe1bc168f6
commit 97135d9cfa
46 changed files with 150 additions and 106 deletions
+2 -2
View File
@@ -72,7 +72,7 @@ export const roleServiceFactory = ({
slug: data.slug,
[scope.key]: scope.value
});
if (existingRole) throw new NotFoundError({ message: `Role with ${data.slug} exist` });
if (existingRole) throw new NotFoundError({ message: `Role with ${data.slug} exists` });
validateHandlebarTemplate("Role Creation", JSON.stringify(data.permissions || []), {
allowedExpressions: (val) => val.includes("identity.")
@@ -108,7 +108,7 @@ export const roleServiceFactory = ({
[scope.key]: scope.value
});
if (existingSlug && existingRole.id !== existingSlug.id)
throw new BadRequestError({ message: `Role with ${data.slug} not found` });
throw new BadRequestError({ message: `Role with ${data.slug} already exists` });
}
validateHandlebarTemplate("Role Update", JSON.stringify(data.permissions || []), {