Skip to content

Commit

Permalink
Revert "Comment: comment api type 설정 (1차 작업)"
Browse files Browse the repository at this point in the history
This reverts commit c906c6d.
  • Loading branch information
heejung0413 committed Apr 14, 2024
1 parent c906c6d commit 9d513cb
Showing 1 changed file with 8 additions and 41 deletions.
49 changes: 8 additions & 41 deletions src/api/@types/Comment.ts
Original file line number Diff line number Diff line change
@@ -1,48 +1,15 @@
export interface GetCommentRequest {
id: string;
}

export interface GetCommentResponse {
code: number;
message: string;
data: {
id: number;
content: string;
};
}
// 임시 API

//put
export interface PutCommentRequest {
id: number;
}

//delete
export interface DeleteCommentRequest {
id: number;
}

export interface DeleteCommentResponse {
code: number;
message: string;
data: object;
}

//GetAllComment
export interface AllGetCommentResponse {
code: number;
message: string;
data: CommentData[];
export interface CommentRequest {
id: string;
}

export interface CommentData {
id: number;
comment: string;
export interface CommentResponse {
id: string;
name: string;
text: string;
}

//Post

export interface CommentClient {
getComment(request: GetCommentRequest): Promise<GetCommentResponse>;
delete(request: DeleteCommentRequest): Promise<DeleteCommentResponse>;
getAllComment(): Promise<AllGetCommentResponse>;
getComment(): Promise<CommentResponse>;
}

0 comments on commit 9d513cb

Please sign in to comment.