Update api endpoints for new association

This commit is contained in:
Owen
2025-03-31 16:21:01 -04:00
parent 1baa02de89
commit 56e1684e2e
7 changed files with 172 additions and 133 deletions

View File

@@ -102,7 +102,7 @@ authenticated.get(
);
authenticated.get(
"/site/:siteId/pick-client-defaults",
"/pick-client-defaults",
verifySiteAccess,
verifyUserHasAction(ActionsEnum.createClient),
client.pickClientDefaults
@@ -116,8 +116,8 @@ authenticated.get(
);
authenticated.put(
"/site/:siteId/client",
verifySiteAccess,
"/org/:orgId/client",
verifyOrgAccess,
verifyUserHasAction(ActionsEnum.createClient),
client.createClient
);
@@ -129,6 +129,13 @@ authenticated.delete(
client.deleteClient
);
authenticated.post(
"/client/:clientId",
verifyClientAccess, // this will check if the user has access to the client
verifyUserHasAction(ActionsEnum.updateClient), // this will check if the user has permission to update the client
client.updateClient
);
// authenticated.get(
// "/site/:siteId/roles",
// verifySiteAccess,