-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
정들었던 하우스 마지막 커밋입니다.. 고생했어요 혜정이 혁준이 !!!!!
- Loading branch information
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
hous-api/src/main/java/hous/api/notification/NotificationController.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,35 @@ | ||
package hous.api.notification; | ||
|
||
import javax.validation.Valid; | ||
|
||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import hous.api.service.notification.NotificationService; | ||
import hous.api.service.notification.dto.request.NotificationSendAllRequestDto; | ||
import hous.common.dto.SuccessResponse; | ||
import io.swagger.annotations.Api; | ||
import io.swagger.annotations.ApiOperation; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Api(tags = "Todo") | ||
@RestController | ||
@RequestMapping("/v1") | ||
@RequiredArgsConstructor | ||
public class NotificationController { | ||
|
||
private final NotificationService notificationService; | ||
|
||
@ApiOperation( | ||
value = "마지막 API 입니당. ㅠㅠ 혜정이 혁준이 고생했어요.", | ||
notes = "앱 종료 푸시 알림을 전송합니다." | ||
) | ||
@PostMapping("/notification/all") | ||
public ResponseEntity<SuccessResponse<String>> sendAll(@Valid @RequestBody NotificationSendAllRequestDto request) { | ||
notificationService.sendAll(request); | ||
return SuccessResponse.OK; | ||
} | ||
} |
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
19 changes: 19 additions & 0 deletions
19
...rc/main/java/hous/api/service/notification/dto/request/NotificationSendAllRequestDto.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,19 @@ | ||
package hous.api.service.notification.dto.request; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
@ToString | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@Builder(access = AccessLevel.PRIVATE) | ||
public class NotificationSendAllRequestDto { | ||
|
||
private String title; | ||
private String body; | ||
} |
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