Skip to content

Commit

Permalink
Merge pull request #111 from BCAndreaC/main
Browse files Browse the repository at this point in the history
FIX: API configuracion users
  • Loading branch information
thatmare authored Jul 28, 2023
2 parents 361696c + 999e164 commit 6681846
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Services/users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function patchUsers(id: number, email: string, password: string, role: string):
console.error('Error: email, password and role are required')
}
const token = localStorage.getItem('token');
return fetch(`https://burger-queen-api-mock-production-9d92.up.railway.app/${id}`, {
return fetch(`https://burger-queen-api-mock-production-9d92.up.railway.app/users/${id}`, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
Expand All @@ -70,7 +70,7 @@ function patchUsers(id: number, email: string, password: string, role: string):

function deleteUsers(id: number) {
const token = localStorage.getItem('token');
return fetch(`https://burger-queen-api-mock-production-9d92.up.railway.app/${id}`, {
return fetch(`https://burger-queen-api-mock-production-9d92.up.railway.app/users/${id}`, {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
Expand Down

0 comments on commit 6681846

Please sign in to comment.