Add middleware for verifying roles, use middleware on appropriate routs

This commit is contained in:
Alex Holliday committed 2024-08-27 10:39:55 -07:00
1 parent 465c1f9f9e
commit 5bd13a572e
5 files changed
+91 -10

No files matched your search

+3
View File
@@ -17,6 +17,9 @@ const errorMessages = {
VERIFY_OWNER_NOT_FOUND: "Document not found",
VERIFY_OWNER_UNAUTHORIZED: "Unauthorized access",
//Permissions Middleware
INSUFFICIENT_PERMISSIONS: "Insufficient permissions",
//DB Errors
DB_USER_EXISTS: "User already exists",
DB_USER_NOT_FOUND: "User not found",