Skip to content

Commit

Permalink
fix: userService local
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaam committed Jul 16, 2024
1 parent 1513b6b commit f176d7a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { url } from '../api';
import { url } from './api';

export const UserService = {
getPets: async (userId) => {
Expand All @@ -9,8 +9,7 @@ export const UserService = {
throw new Error('Ocorreu um erro na requisição');
}

const { pets } = await response.json();
return pets;
return response.json();
} catch (error) {
return `Ocorreu o seguinte erro: ${error}`;
}
Expand Down

0 comments on commit f176d7a

Please sign in to comment.