Update how users and invitations are managed within the system
Corrects the API request method for resending invitations, deleting invitations, and manually creating users in the `InvitationManagement` component. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 3a22ac80-cd1d-4441-9e36-f24fc2f4c3de Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3478f7c3-db8c-4fca-9165-3adbdf1b5829/3a22ac80-cd1d-4441-9e36-f24fc2f4c3de/gBqmpbl
This commit is contained in:
@@ -14,10 +14,6 @@ run = ["npm", "run", "start"]
|
||||
localPort = 5000
|
||||
externalPort = 80
|
||||
|
||||
[[ports]]
|
||||
localPort = 35473
|
||||
externalPort = 3000
|
||||
|
||||
[workflows]
|
||||
runButton = "Project"
|
||||
|
||||
|
||||
@@ -40,9 +40,7 @@ export function InvitationManagement({ invitations }: InvitationManagementProps)
|
||||
// Resend invitation mutation
|
||||
const resendInvitationMutation = useMutation({
|
||||
mutationFn: async (invitationId: number) => {
|
||||
await apiRequest(`/api/invitations/${invitationId}/resend`, {
|
||||
method: "POST"
|
||||
});
|
||||
await apiRequest("POST", `/api/invitations/${invitationId}/resend`);
|
||||
},
|
||||
onSuccess: () => {
|
||||
toast({
|
||||
@@ -64,9 +62,7 @@ export function InvitationManagement({ invitations }: InvitationManagementProps)
|
||||
// Delete invitation mutation
|
||||
const deleteInvitationMutation = useMutation({
|
||||
mutationFn: async (invitationId: number) => {
|
||||
await apiRequest(`/api/invitations/${invitationId}`, {
|
||||
method: "DELETE"
|
||||
});
|
||||
await apiRequest("DELETE", `/api/invitations/${invitationId}`);
|
||||
},
|
||||
onSuccess: () => {
|
||||
toast({
|
||||
@@ -87,11 +83,7 @@ export function InvitationManagement({ invitations }: InvitationManagementProps)
|
||||
// Manual user creation mutation
|
||||
const createUserMutation = useMutation({
|
||||
mutationFn: async (userData: typeof manualUserData) => {
|
||||
await apiRequest("/api/users/create-manual", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(userData),
|
||||
headers: { "Content-Type": "application/json" }
|
||||
});
|
||||
await apiRequest("POST", "/api/users/create-manual", userData);
|
||||
},
|
||||
onSuccess: () => {
|
||||
toast({
|
||||
|
||||
Reference in New Issue
Block a user