-
Notifications
You must be signed in to change notification settings - Fork 0
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 #35 from goormthon-Univ/feature/31
[Refactor] ๋๊ธ, ๋ง์ดํ์ด์ง ๋ฆฌํฉํ ๋ง
- Loading branch information
Showing
5 changed files
with
76 additions
and
18 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
40 changes: 40 additions & 0 deletions
40
src/main/java/com/beotkkot/qtudy/dto/response/comments/DeleteCommentsResponseDto.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,40 @@ | ||
package com.beotkkot.qtudy.dto.response.comments; | ||
|
||
import com.beotkkot.qtudy.common.ResponseCode; | ||
import com.beotkkot.qtudy.common.ResponseMessage; | ||
import com.beotkkot.qtudy.dto.response.ResponseDto; | ||
import lombok.Getter; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
|
||
@Getter | ||
public class DeleteCommentsResponseDto extends ResponseDto{ | ||
public DeleteCommentsResponseDto() { | ||
super(ResponseCode.SUCCESS, ResponseMessage.SUCCESS); | ||
} | ||
|
||
public static ResponseEntity<DeleteCommentsResponseDto> success() { | ||
DeleteCommentsResponseDto result = new DeleteCommentsResponseDto(); | ||
return ResponseEntity.status(HttpStatus.OK).body(result); | ||
} | ||
|
||
public static ResponseEntity<ResponseDto> notExistedPost(){ | ||
ResponseDto result = new ResponseDto(ResponseCode.NOT_EXISTED_POST, ResponseMessage.NOT_EXISTED_POST); | ||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(result); | ||
} | ||
|
||
public static ResponseEntity<ResponseDto> notExistedUser() { | ||
ResponseDto result = new ResponseDto(ResponseCode.NOT_EXISTED_USER, ResponseMessage.NOT_EXISTED_USER); | ||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(result); | ||
} | ||
|
||
public static ResponseEntity<? super DeleteCommentsResponseDto> notExistedComment() { | ||
ResponseDto result = new ResponseDto(ResponseCode.NOT_EXISTED_COMMENT, ResponseMessage.NOT_EXISTED_COMMENT); | ||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(result); | ||
} | ||
|
||
public static ResponseEntity<ResponseDto> noPermission() { | ||
ResponseDto result = new ResponseDto(ResponseCode.NO_PERMISSION, ResponseMessage.NO_PERMISSION); | ||
return ResponseEntity.status(HttpStatus.FORBIDDEN).body(result); | ||
} | ||
} |
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