Skip to content

Commit

Permalink
#56 Add handler.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SandraBergstrom committed Jul 4, 2023
1 parent 7e06766 commit 0baa4f9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/mocks/handlers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const baseUrl = "https://travel-tickr-api-e57198555b47.herokuapp.com/";

export const handlers = [
rest.get(`${baseURL}dj-rest-auth/user/`, (req, res, ctx) => {
return res(
ctx.json({
pk: 1,
username: "Sandra",
email: "",
first_name: "",
last_name: "",
traveler_id: 1,
traveler_image:
"https://res.cloudinary.com/sandrabergstrom/image/upload/v1/media/../default_profile_uwgpte",
})
);
}),
rest.post(`${baseURL}dj-res-auth/logout/`, (req, res, ctx) => {
return res(ctx.status(200));
}),
];

0 comments on commit 0baa4f9

Please sign in to comment.