-
Notifications
You must be signed in to change notification settings - Fork 21
[황승찬] Sprint9 #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Irelander
merged 6 commits into
codeit-sprint-fullstack:next-황승찬
from
HwSoonDev:next-황승찬-sprint9
Oct 14, 2025
The head ref may contain hidden characters: "next-\uD669\uC2B9\uCC2C-sprint9"
Merged
[황승찬] Sprint9 #142
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| GET http://localhost:3000/products | ||
| GET http://localhost:4000/products | ||
|
|
||
| ### | ||
|
|
||
|
|
||
2 changes: 2 additions & 0 deletions
2
backend/prisma_back/prisma/migrations/20251004183544_product_user_name/migration.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| -- AlterTable | ||
| ALTER TABLE "public"."Product" ADD COLUMN "userName" TEXT NOT NULL DEFAULT '판매자판다'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| const url = "https://panda-market-api.vercel.app/"; | ||
|
|
||
|
|
||
| export async function login(body){ | ||
| const res = await fetch(`${url}/auth/signIn`, { | ||
| method: 'POST', | ||
| headers: { 'Content-Type': 'application/json' }, | ||
| body: JSON.stringify(body) | ||
| }) | ||
| .then((res) => { | ||
| if (!res.ok) { | ||
| throw new Error(`HTTP error! status: ${res.status}`); | ||
| } | ||
| return res.json(); | ||
| }) | ||
| .then((res) => res.data) | ||
| .catch((err)=> { | ||
| console.log(`에러: ${err.message}`); | ||
| return err.message; | ||
| }); | ||
|
|
||
| return res; | ||
| } | ||
|
|
||
| export async function signup(body){ | ||
| const res = await fetch(`${url}/auth/signUp`, { | ||
| method: 'POST', | ||
| headers: { 'Content-Type': 'application/json' }, | ||
| body: JSON.stringify(body) | ||
| }) | ||
| .then((res) => { | ||
| if (!res.ok) { | ||
| throw new Error(`HTTP error! status: ${res.status}`); | ||
| } | ||
| return res.json(); | ||
| }) | ||
| .then((res) => res.data) | ||
| .catch((err)=> { | ||
| console.log(`에러: ${err.message}`); | ||
| return err.message; | ||
| }); | ||
|
|
||
| return res; | ||
| } | ||
|
|
||
| export async function getToken(refreshToken){ | ||
| const body = { | ||
| refreshToken | ||
| } | ||
| const res = await fetch(`${url}/auth/refresh-token`, { | ||
| method: 'POST', | ||
| headers: { 'Content-Type': 'application/json' }, | ||
| body: JSON.stringify(body) | ||
| }) | ||
| .then((res) => { | ||
| if (!res.ok) { | ||
| throw new Error(`HTTP error! status: ${res.status}`); | ||
| } | ||
| return res.json(); | ||
| }) | ||
| .then((res) => res.data) | ||
| .catch((err)=> { | ||
| console.log(`에러: ${err.message}`); | ||
| return err.message; | ||
| }); | ||
|
|
||
| return res; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.then((res) => res.data)부분이 잘못됐어요!API 응답 구조는 { accessToken, refreshToken, user } 인데
res.data를 하면 undefined가 반환됩니다.
catch에서 에러 메시지(문자열)를 반환하는데,
호출하는 쪽에서 res.accessToken을 기대하면 undefined 에러 발생!