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
|
localPort = 5000
|
||||||
externalPort = 80
|
externalPort = 80
|
||||||
|
|
||||||
[[ports]]
|
|
||||||
localPort = 35473
|
|
||||||
externalPort = 3000
|
|
||||||
|
|
||||||
[workflows]
|
[workflows]
|
||||||
runButton = "Project"
|
runButton = "Project"
|
||||||
|
|
||||||
|
|||||||
@@ -40,9 +40,7 @@ export function InvitationManagement({ invitations }: InvitationManagementProps)
|
|||||||
// Resend invitation mutation
|
// Resend invitation mutation
|
||||||
const resendInvitationMutation = useMutation({
|
const resendInvitationMutation = useMutation({
|
||||||
mutationFn: async (invitationId: number) => {
|
mutationFn: async (invitationId: number) => {
|
||||||
await apiRequest(`/api/invitations/${invitationId}/resend`, {
|
await apiRequest("POST", `/api/invitations/${invitationId}/resend`);
|
||||||
method: "POST"
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
toast({
|
toast({
|
||||||
@@ -64,9 +62,7 @@ export function InvitationManagement({ invitations }: InvitationManagementProps)
|
|||||||
// Delete invitation mutation
|
// Delete invitation mutation
|
||||||
const deleteInvitationMutation = useMutation({
|
const deleteInvitationMutation = useMutation({
|
||||||
mutationFn: async (invitationId: number) => {
|
mutationFn: async (invitationId: number) => {
|
||||||
await apiRequest(`/api/invitations/${invitationId}`, {
|
await apiRequest("DELETE", `/api/invitations/${invitationId}`);
|
||||||
method: "DELETE"
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
toast({
|
toast({
|
||||||
@@ -87,11 +83,7 @@ export function InvitationManagement({ invitations }: InvitationManagementProps)
|
|||||||
// Manual user creation mutation
|
// Manual user creation mutation
|
||||||
const createUserMutation = useMutation({
|
const createUserMutation = useMutation({
|
||||||
mutationFn: async (userData: typeof manualUserData) => {
|
mutationFn: async (userData: typeof manualUserData) => {
|
||||||
await apiRequest("/api/users/create-manual", {
|
await apiRequest("POST", "/api/users/create-manual", userData);
|
||||||
method: "POST",
|
|
||||||
body: JSON.stringify(userData),
|
|
||||||
headers: { "Content-Type": "application/json" }
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
toast({
|
toast({
|
||||||
|
|||||||
Reference in New Issue
Block a user