mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-08-07 08:43:12 +00:00
Update user ID type to string throughout the application.
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/fd178635-7356-4ff4-a868-0a00dcf186f0.jpg
This commit is contained in:
@@ -77,7 +77,7 @@ const userFormSchema = z.object({
|
||||
password: z.string().min(8, "Password must be at least 8 characters"),
|
||||
fullName: z.string().optional(),
|
||||
role: z.enum(systemRoles as unknown as [string, ...string[]]),
|
||||
organizationId: z.number().optional(),
|
||||
organizationId: z.string().optional(),
|
||||
});
|
||||
|
||||
export default function UsersRolesPage() {
|
||||
@@ -152,7 +152,7 @@ export default function UsersRolesPage() {
|
||||
|
||||
// Update user role mutation
|
||||
const updateRoleMutation = useMutation({
|
||||
mutationFn: async ({ userId, role }: { userId: number, role: UserRole }) => {
|
||||
mutationFn: async ({ userId, role }: { userId: string, role: UserRole }) => {
|
||||
const res = await apiRequest("PUT", `/api/users/${userId}`, { role });
|
||||
return await res.json();
|
||||
},
|
||||
@@ -176,7 +176,7 @@ export default function UsersRolesPage() {
|
||||
|
||||
// Delete user mutation
|
||||
const deleteUserMutation = useMutation({
|
||||
mutationFn: async (userId: number) => {
|
||||
mutationFn: async (userId: string) => {
|
||||
await apiRequest("DELETE", `/api/users/${userId}`);
|
||||
},
|
||||
onSuccess: () => {
|
||||
|
||||
Reference in New Issue
Block a user