-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement voice comment apis mock
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
post/src/main/java/com/oing/controller/VoiceCommentController.java
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,51 @@ | ||
package com.oing.controller; | ||
|
||
import com.oing.dto.request.CreatePostCommentRequest; | ||
import com.oing.dto.response.DefaultResponse; | ||
import com.oing.dto.response.PaginationResponse; | ||
import com.oing.dto.response.PostVoiceCommentResponse; | ||
import com.oing.restapi.VoiceCommentApi; | ||
import org.springframework.stereotype.Controller; | ||
|
||
import java.time.ZonedDateTime; | ||
import java.util.List; | ||
|
||
@Controller | ||
public class VoiceCommentController implements VoiceCommentApi { | ||
@Override | ||
public PostVoiceCommentResponse createPostVoiceComment(String postId, | ||
CreatePostCommentRequest request, String loginMemberId) { | ||
return new PostVoiceCommentResponse( | ||
"01HGW2N7EHJVJ4CJ999RRS2E97", | ||
postId, | ||
loginMemberId, | ||
"https://..", | ||
ZonedDateTime.now() | ||
); | ||
} | ||
|
||
@Override | ||
public DefaultResponse deletePostVoiceComment(String postId, String commentId, String loginMemberId) { | ||
return DefaultResponse.ok(); | ||
} | ||
|
||
@Override | ||
public PaginationResponse<PostVoiceCommentResponse> getPostComments(String postId, Integer page, Integer size, | ||
String sort, String loginMemberId) { | ||
return new PaginationResponse<>( | ||
1, | ||
1, | ||
size, | ||
false, | ||
List.of( | ||
new PostVoiceCommentResponse( | ||
"01HGW2N7EHJVJ4CJ999RRS2E97", | ||
postId, | ||
loginMemberId, | ||
"https://..", | ||
ZonedDateTime.now() | ||
) | ||
) | ||
); | ||
} | ||
} |