-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: /presentations DTO 구현 및 API 연동 (#111) #113
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 7 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
ab29621
refactor: 타입 맞추기 (#111)
AndyH0ng e0566ff
fix: API 경로 수정 (#111)
AndyH0ng e7fd61a
fix: Presentation API 연결 (#111)
AndyH0ng b5ec59b
fix: /presentations API 연결 (#111)
AndyH0ng 4a8a219
Merge branch 'develop' into refactor/setting-type-111
AndyH0ng ff9abe7
feat: /comments API 연결 (#111)
AndyH0ng d8bbbe1
Merge branch 'refactor/setting-type-111' of https://github.com/TTORAN…
AndyH0ng 295b1ae
feat: 구글 로그인 연동 (#111)
AndyH0ng 6523ec7
feat: 네이버 카카오 로그인 연동 (#111)
AndyH0ng a026d8f
feat: 로그인 콜백 및 라우팅 (#111)
AndyH0ng 778b328
design: 제목 수정 팝오버 사용성 개선 (#111)
AndyH0ng 59b5a03
fix: 빌드 오류 해결 (#111)
AndyH0ng 06f29fb
refactor: api 연동 구조 변경 (#111)
kimyw1018 44f486e
refactor: 빌드에러 수정(#111)
kimyw1018 5e75db5
fix: 무한루프 해결(#111)
kimyw1018 eed8303
fix: SocialLoginSuccessResponseDto로 업데이트 (#111)
AndyH0ng 05bda5c
refactor: Script 타입을 DTO로 통합 (#111)
AndyH0ng 3ecaf2e
refactor: Slide 타입을 DTO로 통합 (#111)
AndyH0ng 0d632a5
refactor: Comment 타입을 DTO로 통합 (#111)
AndyH0ng 435a0d5
fix: DTO export 누락 및 import 오류 수정 (#111)
AndyH0ng 7e65f9c
Merge branch 'refactor/setting-type-111' of https://github.com/TTORAN…
kimyw1018 e27ed4a
refactor: Video DTO 구조 통일 (#111)
AndyH0ng d1a545b
Merge branch 'refactor/setting-type-111' of https://github.com/TTORAN…
AndyH0ng e633cfb
Merge branch 'develop' into refactor/setting-type-111
AndyH0ng 73dd156
fix: 빌드 오류 2/3 해결 (#111)
AndyH0ng 411b6ee
fix: Recording props 수정(#111)
kimyw1018 02119e3
fix: 클로드 리뷰 반영 (#111)
kimyw1018 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** | ||
| * @file index.ts | ||
| * @description DTO 배럴 export | ||
| */ | ||
|
|
||
| export type { CreateProjectDto, UpdateProjectDto } from './projects.dto'; | ||
| export type { CreateSlideDto, UpdateSlideDto } from './slides.dto'; | ||
| export type { UpdateScriptDto, RestoreScriptDto } from './scripts.dto'; | ||
| export type { CreateOpinionDto } from './opinions.dto'; | ||
| export type { ToggleSlideReactionDto } from './reactions.dto'; |
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,8 @@ | ||
| /** | ||
| * 의견(댓글) 생성 요청 DTO | ||
| */ | ||
| export interface CreateOpinionDto { | ||
| content: string; | ||
| /** 답글인 경우 부모 의견 ID */ | ||
| parentId?: string; | ||
| } | ||
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,14 @@ | ||
| /** | ||
| * 프로젝트 수정 요청 DTO | ||
| */ | ||
| export interface UpdateProjectDto { | ||
| title: string; | ||
| } | ||
|
|
||
| /** | ||
| * 프로젝트 생성 요청 DTO | ||
| */ | ||
| export interface CreateProjectDto { | ||
| title: string; | ||
| uploadFileId: string; | ||
| } |
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,8 @@ | ||
| import type { ReactionType } from '@/types/script'; | ||
|
|
||
| /** | ||
| * 슬라이드 리액션 토글 요청 DTO | ||
| */ | ||
| export interface ToggleSlideReactionDto { | ||
| type: ReactionType; | ||
| } |
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,13 @@ | ||
| /** | ||
| * 대본 저장 요청 DTO | ||
kimyw1018 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| */ | ||
| export interface UpdateScriptDto { | ||
| script: string; | ||
| } | ||
|
|
||
| /** | ||
| * 대본 복원 요청 DTO | ||
| */ | ||
| export interface RestoreScriptDto { | ||
| version: number; | ||
| } | ||
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,14 @@ | ||
| /** | ||
| * 슬라이드 제목 수정 요청 DTO | ||
| */ | ||
| export interface UpdateSlideDto { | ||
| title?: string; | ||
| } | ||
|
|
||
| /** | ||
| * 슬라이드 생성 요청 DTO | ||
| */ | ||
| export interface CreateSlideDto { | ||
| title: string; | ||
| script?: string; | ||
| } |
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,123 @@ | ||
| /** | ||
| * @file comments.ts | ||
| * @description 댓글 관련 API 엔드포인트 | ||
| */ | ||
| import { apiClient } from '@/api/client'; | ||
| import type { ApiResponse } from '@/types/api'; | ||
| import type { CommentListResponse, CommentResponse, ReplyListResponse } from '@/types/comment'; | ||
|
|
||
| /** | ||
| * 슬라이드 댓글 목록 조회 | ||
| * | ||
| * @param slideId - 슬라이드 ID | ||
| * @param page - 페이지 번호 (기본값: 1) | ||
| * @param limit - 페이지당 개수 (기본값: 20) | ||
| * @returns 댓글 목록 및 페이지네이션 정보 | ||
| */ | ||
| export async function getSlideComments( | ||
| slideId: string, | ||
| page = 1, | ||
| limit = 20, | ||
| ): Promise<CommentListResponse> { | ||
| const response = await apiClient.get<ApiResponse<CommentListResponse>>( | ||
| `/slides/${slideId}/comments`, | ||
| { | ||
| params: { page, limit }, | ||
| }, | ||
| ); | ||
|
|
||
| if (response.data.resultType === 'SUCCESS') { | ||
| return response.data.success; | ||
| } | ||
| throw new Error(response.data.error.reason); | ||
| } | ||
|
|
||
| /** | ||
| * 슬라이드에 댓글 작성 | ||
| * | ||
| * @param slideId - 슬라이드 ID | ||
| * @param data - 댓글 내용 | ||
| * @returns 생성된 댓글 정보 | ||
| */ | ||
| export async function createSlideComment( | ||
| slideId: string, | ||
| data: { content: string }, | ||
| ): Promise<CommentResponse> { | ||
| const response = await apiClient.post<ApiResponse<CommentResponse>>( | ||
| `/slides/${slideId}/comments`, | ||
| data, | ||
| ); | ||
|
|
||
| if (response.data.resultType === 'SUCCESS') { | ||
| return response.data.success; | ||
| } | ||
| throw new Error(response.data.error.reason); | ||
| } | ||
|
|
||
| /** | ||
| * 댓글에 답글 작성 | ||
| * | ||
| * @param commentId - 부모 댓글 ID | ||
| * @param data - 답글 내용 | ||
| * @returns 생성된 답글 정보 | ||
| */ | ||
| export async function createReply( | ||
| commentId: string, | ||
| data: { content: string }, | ||
| ): Promise<CommentResponse> { | ||
| const response = await apiClient.post<ApiResponse<CommentResponse>>( | ||
| `/comments/${commentId}/replies`, | ||
| data, | ||
| ); | ||
|
|
||
| if (response.data.resultType === 'SUCCESS') { | ||
| return response.data.success; | ||
| } | ||
| throw new Error(response.data.error.reason); | ||
| } | ||
|
|
||
| /** | ||
| * 댓글의 답글 목록 조회 | ||
| * | ||
| * @param commentId - 댓글 ID | ||
| * @returns 답글 목록 | ||
| */ | ||
| export async function getReplies(commentId: string): Promise<ReplyListResponse> { | ||
| const response = await apiClient.get<ReplyListResponse>(`/comments/${commentId}/replies`); | ||
| return response.data; | ||
| } | ||
|
|
||
| /** | ||
| * 댓글 수정 | ||
| * | ||
| * @param commentId - 댓글 ID | ||
| * @param data - 수정할 내용 | ||
| * @returns 수정된 댓글 정보 | ||
| */ | ||
| export async function updateComment( | ||
| commentId: string, | ||
| data: { content: string }, | ||
| ): Promise<CommentResponse> { | ||
| const response = await apiClient.patch<ApiResponse<CommentResponse>>( | ||
| `/comments/${commentId}`, | ||
| data, | ||
| ); | ||
|
|
||
| if (response.data.resultType === 'SUCCESS') { | ||
| return response.data.success; | ||
| } | ||
| throw new Error(response.data.error.reason); | ||
| } | ||
|
|
||
| /** | ||
| * 댓글 삭제 | ||
| * | ||
| * @param commentId - 댓글 ID | ||
| */ | ||
| export async function deleteComment(commentId: string): Promise<void> { | ||
| const response = await apiClient.delete<ApiResponse<null>>(`/comments/${commentId}`); | ||
|
|
||
| if (response.data.resultType === 'FAILURE') { | ||
| throw new Error(response.data.error.reason); | ||
| } | ||
| } |
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.
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.
Uh oh!
There was an error while loading. Please reload this page.