-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #415 from TripInfoWeb/dev
Release: v1.1.0
- Loading branch information
Showing
36 changed files
with
1,245 additions
and
276 deletions.
There are no files selected for viewing
This file contains 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,30 @@ | ||
--- | ||
name: Bug Report | ||
about: 어떤 버그인지 설명해 주세요. | ||
title: "Bug: 버그 설명" | ||
labels: Bug | ||
assignees: "" | ||
--- | ||
|
||
## ❓ 어떤 버그인가요? | ||
|
||
- 어떤 버그인지 설명해 주세요. | ||
|
||
## 🖥️ 발생 환경 | ||
|
||
- OS: (Ex. Windows, macOS, Ubuntu) | ||
- 브라우저: (Ex. Chrome, Firefox) | ||
- 버전: (Ex. v1.0.3) | ||
|
||
## 🕘 발생 일시 | ||
|
||
- 버그가 발생한 날짜와 시간을 입력해 주세요. (Ex. 2024년 10월 1일, 오후 3시 30분) | ||
|
||
## 📝 예상 결과 | ||
|
||
- 예상했던 정상적인 결과가 어떤 것이었는지 설명해주세요 | ||
|
||
## 📚 참고할만한 자료(선택) | ||
|
||
- 추가적으로 참고할 만한 사항이 있으면 적어주세요. | ||
- 없는 경우 해당 단락을 삭제해 주세요. |
This file contains 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,27 @@ | ||
--- | ||
name: Feature Request | ||
about: 새로운 기능 추가 요청을 작성해 주세요. | ||
title: "Feat: 기능 설명" | ||
labels: Feat | ||
assignees: "" | ||
--- | ||
|
||
## ❓ 어떤 기능인가요? | ||
|
||
- 추가 요청하려는 기능에 대해 설명해 주세요. | ||
|
||
## 📝 기능 설명 | ||
|
||
- 추가하려는 기능의 세부 설명 및 목적을 작성해 주세요. | ||
|
||
## ✅ TODO | ||
|
||
구현해야 하는 기능에 대해 체크리스트를 작성해 주세요. | ||
|
||
- [ ] TODO 1 | ||
- [ ] TODO 2 | ||
|
||
## 📚 참고할만한 자료(선택) | ||
|
||
- 추가적으로 참고할 만한 사항이 있으면 적어주세요. | ||
- 없는 경우 해당 단락을 삭제해 주세요. |
This file contains 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,36 @@ | ||
- 제목: Feat: 기능명 | ||
Ex. Feat: pull request template 작성 | ||
|
||
-- 절취선 위 부분의 내용은 모두 삭제하고 PR을 작성해 주세요. -- | ||
|
||
---- 절취선 ---- | ||
|
||
## ☑️ 개발 유형 | ||
|
||
- [x] Front-end | ||
|
||
## ✔️ PR 유형 | ||
|
||
- [ ] 새로운 기능 추가 | ||
- [ ] 버그 수정 | ||
- [ ] CSS 등 사용자 UI 디자인 변경 | ||
- [ ] 기존 기능에 영향을 주지 않는 변경사항 (Ex. 오타 수정, 탭 사이즈 변경, 변수명 변경, 코드 리팩토링 등) | ||
- [ ] 주석 관련 작업 | ||
- [ ] 문서 관련 작업 | ||
- [ ] 테스트 추가 혹은 테스트 리팩토링 | ||
- [ ] 빌드 부분 혹은 패키지 매니저 수정 | ||
- [ ] 파일 혹은 폴더명 수정 | ||
- [ ] 파일 혹은 폴더 삭제 | ||
|
||
## 📝 작업 내용 | ||
|
||
이번 PR에서 작업한 내용을 간략히 설명해주세요. | ||
|
||
- [x] 구현한 기능 1 | ||
- [x] 구현한 기능 2 | ||
|
||
## #️⃣ Related Issue | ||
|
||
해당 Pull Request과 관련된 Issue Link를 작성해 주세요 | ||
|
||
Ex. #123 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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,103 @@ | ||
import { | ||
CreateInformationCommentRequestDto, | ||
UpdateInformationCommentRequestDto, | ||
} from "@/types/InformationCommentDto"; | ||
import { NextRequest } from "next/server"; | ||
|
||
/** | ||
* @method GET | ||
* @url /api/informations/comments/:informationId?page=0 | ||
* @description 댓글 목록 조회 | ||
*/ | ||
export async function GET( | ||
request: NextRequest, | ||
{ params }: { params: { id: string } }, | ||
) { | ||
const cookie = request.cookies.get("access_token"); | ||
const searchParams = request.nextUrl.searchParams; | ||
const page = searchParams.get("page") ?? "0"; | ||
|
||
return await fetch( | ||
`${process.env.BACKEND_URL}/api/informations/comments/${params.id}?page=${page}`, | ||
{ | ||
method: "GET", | ||
headers: { | ||
"Content-Type": "application/json", | ||
Cookie: `${cookie?.name}=${cookie?.value}`, | ||
}, | ||
cache: "no-store", | ||
}, | ||
); | ||
} | ||
|
||
/** | ||
* @method POST | ||
* @url /api/informations/comments/:informationId | ||
* @description 댓글 작성 | ||
*/ | ||
export async function POST( | ||
request: NextRequest, | ||
{ params }: { params: { id: number } }, | ||
) { | ||
const cookie = request.cookies.get("access_token"); | ||
const body: CreateInformationCommentRequestDto = await request.json(); | ||
return await fetch( | ||
`${process.env.BACKEND_URL}/api/informations/comments/${params.id}`, | ||
{ | ||
method: "POST", | ||
headers: { | ||
"Content-Type": "application/json", | ||
Cookie: `${cookie?.name}=${cookie?.value}`, | ||
}, | ||
body: JSON.stringify(body), | ||
cache: "no-store", | ||
}, | ||
); | ||
} | ||
|
||
/** | ||
* @method PUT | ||
* @url /api/informations/comments/:informationId | ||
* @description 댓글 수정 | ||
*/ | ||
export async function PUT( | ||
request: NextRequest, | ||
{ params }: { params: { id: number } }, | ||
) { | ||
const cookie = request.cookies.get("access_token"); | ||
const body: UpdateInformationCommentRequestDto = await request.json(); | ||
return await fetch( | ||
`${process.env.BACKEND_URL}/api/informations/comments/${params.id}`, | ||
{ | ||
method: "PUT", | ||
headers: { | ||
"Content-Type": "application/json", | ||
Cookie: `${cookie?.name}=${cookie?.value}`, | ||
}, | ||
body: JSON.stringify(body), | ||
cache: "no-store", | ||
}, | ||
); | ||
} | ||
|
||
/** | ||
* @method DELETE | ||
* @url /api/informations/comments/:informationCommentId | ||
* @description 댓글 삭제 | ||
*/ | ||
export async function DELETE( | ||
request: NextRequest, | ||
{ params }: { params: { id: number } }, | ||
) { | ||
const cookie = request.cookies.get("access_token"); | ||
return await fetch( | ||
`${process.env.BACKEND_URL}/api/informations/comments/${params.id}`, | ||
{ | ||
method: "DELETE", | ||
headers: { | ||
Cookie: `${cookie?.name}=${cookie?.value}`, | ||
}, | ||
cache: "no-store", | ||
}, | ||
); | ||
} |
This file contains 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 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 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 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.