-
Notifications
You must be signed in to change notification settings - Fork 6
Feat: 폴더 추가 기능 (모달) #55
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
Conversation
99minji
left a comment
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.
고생하셨습니다-!
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.
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.
폴더에 추가는 중복으로도 가능한건가요?
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.
- 커서 포인터 추가하겠습니다!
- 스웨거 보니까 링크 추가 시 하나의 폴더 id 를 지정해야하네요! 지금은 단순히 ui만 있는거라 중복 선택이 안되도록 추후 반영하겠습니다
mungyun
left a comment
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.
Zustand도 잘 사용해주셨고 전반적으로 깔끔한 것 같네요! 고생하셨습니다 🙂
| 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; | ||
| console.log("Token:", token); // 쿠키 확인 | ||
|
|
||
| if (!token) { | ||
| return res.status(401).json({ error: "사용자 정보를 찾을 수 없습니다." }); | ||
| } | ||
|
|
||
| if (req.method === "POST") { | ||
| try { | ||
| const response = await axiosInstance.post("/folders", req.body, { | ||
| headers: { | ||
| Authorization: `Bearer ${token}`, | ||
| }, | ||
| }); | ||
| console.log(response); |
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.
깔끔하게 잘 구현하셨군요 👍

작업 내용
AddFolderModal에서 input value를 받아 폴더를 생성하는 기능을 구현했습니다
page/api/folders 경로에 라우터 핸들러 파일 (proxy) 작성했습니다
[linkbrary 모달 기능 구현 - 폴더 생성 POST api #50 ]
- 링크페이지에서 바로 사용하실 수도 있을것같아 해당 PR 먼저 올립니다.
- 이어서 폴더 수정, 삭제 등 모달 기능 구현 하겠습니다
- EditModal은 작업중이라 무시해주셔도 좋습니다