fix: login endpoint

This commit is contained in:
Vinicius Souza 2024-10-31 09:16:23 -03:00
parent 9034c62a94
commit fe620c6336

View file

@ -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);