-
Notifications
You must be signed in to change notification settings - Fork 6
Fix : 모달 백드롭 스타일 수정 / Feat: 폴더 삭제 모달 기능 추가 #81
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
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
796a8fa
Chore: 공백 삭제
hongggyelim 9efbf25
Design: 링크 수정 모달 추가
hongggyelim 005e127
Chore: 폴더 id prop에 추가
hongggyelim b3d697c
Feat: 폴더 삭제 api 작업 중
hongggyelim 44328c3
Merge branch 'develop' into feature/modalAction
hongggyelim 4c28a7d
Design: 모달 배경 수정 및 스크롤 방지
hongggyelim a1c5f63
Merge branch 'develop' into feature/modalAction
hongggyelim 3e064c9
Fix: EditLinkModal삭제
hongggyelim f616b48
Chore: test 페이지 editLinkModal삭제
hongggyelim 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
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
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 |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import axiosInstance from "@/lib/api/axiosInstanceApi"; | ||
| import axios from "axios"; | ||
| import { NextApiRequest, NextApiResponse } from "next"; | ||
|
|
||
| const handler = async (req: NextApiRequest, res: NextApiResponse) => { | ||
| const token = req.cookies.accessToken; | ||
| const { folderId } = req.query; | ||
| const id = Number(folderId); | ||
|
|
||
| console.log("Token:", token); | ||
| console.log("folderId:", folderId); | ||
|
|
||
| if (!token) { | ||
| return res.status(401).json({ error: "사용자 정보를 찾을 수 없습니다." }); | ||
| } | ||
|
|
||
| if (isNaN(id)) { | ||
| return res.status(400).json({ error: "Invalid folderId" }); | ||
| } | ||
|
|
||
| if (req.method === "DELETE") { | ||
| try { | ||
| const response = await axiosInstance.delete(`/folders/${id}`, { | ||
| headers: { | ||
| Authorization: `Bearer ${token}`, | ||
| }, | ||
| }); | ||
|
|
||
| return res.status(204).json({ message: "폴더 삭제 성공" }); | ||
| } catch (error) { | ||
| if (axios.isAxiosError(error) && error.response) { | ||
| const status = error.response.status; | ||
| const message = error.response.data?.message || "알 수 없는 오류 발생"; | ||
| return res.status(status).json({ message }); | ||
| } | ||
| } | ||
| } else { | ||
| return res.status(500).json({ error: "서버 오류 발생" }); | ||
| } | ||
| }; | ||
| export default handler; |
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
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.
말씀드리려고 했는데 잘 추가해주셨네요 👍