-
Notifications
You must be signed in to change notification settings - Fork 4
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 #204 from donga-it-club/develop
[FE][Release] 240421 배포 테스트 전 중간 빌드 확인
- Loading branch information
Showing
43 changed files
with
673 additions
and
318 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
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 |
---|---|---|
@@ -1,48 +1,50 @@ | ||
export interface GetCommentRequest { | ||
id: string; | ||
//post | ||
export interface PostCommentRequest { | ||
sectionId: number; | ||
commentContent: string; | ||
} | ||
|
||
export interface GetCommentResponse { | ||
export interface PostCommentResponse { | ||
code: number; | ||
message: string; | ||
data: { | ||
id: number; | ||
content: string; | ||
}; | ||
data: PostCommentData; | ||
} | ||
|
||
//put | ||
export interface PutCommentRequest { | ||
export interface PostCommentData { | ||
id: number; | ||
userId: number; | ||
sectionId: number; | ||
commentContent: string; | ||
} | ||
|
||
//delete | ||
export interface DeleteCommentRequest { | ||
id: number; | ||
//put | ||
export interface PutCommentRequest { | ||
commentId: number; | ||
commentContent: string; | ||
} | ||
|
||
export interface DeleteCommentResponse { | ||
export interface PutCommentResponse { | ||
code: number; | ||
message: string; | ||
data: object; | ||
data: PutCommentData; | ||
} | ||
|
||
//GetAllComment | ||
export interface AllGetCommentResponse { | ||
code: number; | ||
message: string; | ||
data: CommentData[]; | ||
export interface PutCommentData { | ||
commentId: number; | ||
content: string; | ||
} | ||
|
||
export interface CommentData { | ||
id: number; | ||
comment: string; | ||
//delete | ||
export interface DeleteCommentRequest { | ||
commentId: number; | ||
} | ||
|
||
//Post | ||
export interface DeleteCommentResponse { | ||
code: number; | ||
} | ||
|
||
export interface CommentClient { | ||
getComment(request: GetCommentRequest): Promise<GetCommentResponse>; | ||
post(request: PostCommentRequest): Promise<PostCommentResponse>; | ||
delete(request: DeleteCommentRequest): Promise<DeleteCommentResponse>; | ||
getAllComment(): Promise<AllGetCommentResponse>; | ||
put(request: PutCommentRequest): Promise<PutCommentResponse>; | ||
} |
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
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
// get | ||
export interface GetUsersRequest { | ||
// userId: number; | ||
} | ||
|
||
export interface GetUsersResponse { | ||
userId: number; | ||
username: string; | ||
email: string; | ||
thumbnail: string | null; | ||
phone: string | null; | ||
createDate: Date; | ||
updateDate: Date; | ||
code: number; | ||
data: { | ||
userId: number; | ||
userName: string; | ||
email: string; | ||
thumbnail: string | null; | ||
phone: string | null; | ||
createDate: Date; | ||
updateDate: Date; | ||
}; | ||
message: string | null; | ||
} |
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 |
---|---|---|
@@ -1,16 +1,31 @@ | ||
import { CommentClient } from '../@types/Comment'; | ||
import { mswInstance } from '../client'; | ||
import { CommentClient, DeleteCommentRequest, PostCommentRequest, PostCommentResponse } from '../@types/Comment'; | ||
import axiosInstance from '../axiosConfig'; | ||
|
||
const ROUTE = '/comments'; | ||
|
||
export const CommentService: CommentClient = { | ||
getComment: async id => { | ||
return await mswInstance.get(`/api/${ROUTE}/${id}`); | ||
post: async (request: PostCommentRequest): Promise<PostCommentResponse> => { | ||
try { | ||
const response = await axiosInstance.post(`${ROUTE}`, request); | ||
return response.data; | ||
} catch (error) { | ||
throw new Error(error as string); | ||
} | ||
}, | ||
delete: async id => { | ||
return await mswInstance.delete(`/api/${ROUTE}/${id}`); | ||
delete: async ({ commentId }: DeleteCommentRequest) => { | ||
try { | ||
const response = await axiosInstance.delete(`${ROUTE}/${commentId}`); | ||
return response.data; | ||
} catch (error) { | ||
throw new Error(error as string); | ||
} | ||
}, | ||
getAllComment: async () => { | ||
return await mswInstance.get(`api/${ROUTE}`); | ||
put: async ({ commentId, ...request }) => { | ||
try { | ||
const response = await axiosInstance.put(`${ROUTE}/${commentId}`, request); | ||
return response.data; | ||
} catch (error) { | ||
throw new Error(error as string); | ||
} | ||
}, | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { GetTeamMembersRequest, GetTeamMembersResponse } from '@/api/@types/TeamController'; | ||
import axiosInstance from '@/api/axiosConfig'; | ||
|
||
export const getMember = async ({ | ||
teamId, | ||
retrospectiveId, | ||
}: GetTeamMembersRequest): Promise<GetTeamMembersResponse> => { | ||
try { | ||
const response = await axiosInstance.get<GetTeamMembersResponse>(`/teams/${teamId}/users?${retrospectiveId}=`); | ||
console.log('팀 멤버 조회 성공', response.data); | ||
return response.data; | ||
} catch (error) { | ||
throw new Error('팀 멤버 조회 실패'); | ||
} | ||
}; |
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,13 @@ | ||
import { PutActionItemsRequest, PutActionItemsResponse } from '@/api/@types/TeamController'; | ||
import axiosInstance from '@/api/axiosConfig'; | ||
|
||
export const putActionItemsMember = async (requestData: PutActionItemsRequest): Promise<PutActionItemsResponse> => { | ||
try { | ||
// console.log(requestData); | ||
const response = await axiosInstance.put<PutActionItemsResponse>('/sections/action-items', requestData); | ||
// console.log('action item 멤버 저장 성공', response); | ||
return response.data; | ||
} catch (error) { | ||
throw new Error('action item 멤버 저장 실패'); | ||
} | ||
}; |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.