From fe620c633668a9722d12d31c638e29c2c7494c21 Mon Sep 17 00:00:00 2001 From: Vinicius Souza Date: Thu, 31 Oct 2024 09:16:23 -0300 Subject: [PATCH] fix: login endpoint --- src/contexts/AuthContext.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contexts/AuthContext.tsx b/src/contexts/AuthContext.tsx index aab4f69..688db6b 100644 --- a/src/contexts/AuthContext.tsx +++ b/src/contexts/AuthContext.tsx @@ -19,7 +19,7 @@ export function AuthContextProvider({ children }: AuthContextProviderProps) { async function signIn(email: string, password: string) { try { - const { data } = await api.post('/users/login', { email, password }); + const { data } = await api.post('/sessions', { email, password }); if (data.user) { setUser(data.user);