update: add delete user api route, AuthProvider extracted from App.tsx

This commit is contained in:
Aaron William Po
2023-06-04 13:26:14 -04:00
parent e3da430425
commit 140abaa5a1
12 changed files with 129 additions and 59 deletions

View File

@@ -13,7 +13,7 @@ interface SendEditUserRequestArgs {
}
const sendEditUserRequest = async ({ user, data }: SendEditUserRequestArgs) => {
const response = await fetch(`/api/users/${user!.id}/edit`, {
const response = await fetch(`/api/users/${user!.id}`, {
body: JSON.stringify(data),
method: 'PUT',
headers: { 'Content-Type': 'application/json' },