Update API documentation and UI to improve clarity and add role-based access control.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/994ee92d-6a6d-4ca4-99c0-fe0dbc7f160b.jpg
This commit is contained in:
alphaeusmote
2025-04-08 02:23:25 +00:00
parent 58f8360240
commit a872feecd2
17 changed files with 1666 additions and 106 deletions
+3 -1
View File
@@ -42,6 +42,8 @@ const registerSchema = insertUserSchema.extend({
acceptTerms: z.boolean().refine(val => val === true, {
message: "You must accept the terms and conditions",
}),
// Define roleId explicitly to match form values
roleId: z.number().optional().nullable(),
}).refine(data => data.password === data.confirmPassword, {
message: "Passwords do not match",
path: ["confirmPassword"],
@@ -140,7 +142,7 @@ export default function AuthPage() {
email: "",
fullName: "",
acceptTerms: false,
role: "user",
roleId: 2, // Assign the default "user" role ID
},
});