Skip to content

Commit

Permalink
Merge pull request #7 from haeyonghahn/feature/#1
Browse files Browse the repository at this point in the history
Fix: mock API 추가
  • Loading branch information
haeyonghahn committed May 20, 2024
2 parents e5741c9 + 8fcb96d commit 9b91b73
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mocks/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import { rest } from "msw";

export const handlers = [
rest.get(`${BASE_URL}/api/v1/oauth/login`, (req, res, ctx) => {
// const searchParams = req.url.searchParams;
// const code = searchParams.get("code");
const searchParams = req.url.searchParams;
const code = searchParams.get("code");
const oAuthResponseData =
code +
"eyJhbGciOiJIUzM4NCJ9.eyJpZCI6InlvdWcxMzIyQG5hdmVyLmNvbSIsImlhdCI6MTcxNjIwNDA2NiwiZXhwIjoxNzE2MzA0MDY2fQ.lRGeWk3L25XP2Z49COO0vmH5HqtMzNjPccPpJCy1wVYwrTp8-AcHkcQrBlUWCstf";
saveAccessTokenToLocalStorage(oAuthResponseData);
return res(ctx.status(200), ctx.json("success"));
Expand Down

0 comments on commit 9b91b73

Please sign in to comment.