-
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.
Browse files
Browse the repository at this point in the history
[feature/#106-elasticsearch] Elasticsearch 데이터 배치
- Loading branch information
Showing
90 changed files
with
1,699 additions
and
461 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
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
21 changes: 19 additions & 2 deletions
21
src/main/java/com/apps/pochak/alarm/controller/AlarmController.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 |
---|---|---|
@@ -1,13 +1,30 @@ | ||
package com.apps.pochak.alarm.controller; | ||
|
||
import com.apps.pochak.alarm.dto.response.AlarmElements; | ||
import com.apps.pochak.alarm.service.AlarmService; | ||
import com.apps.pochak.global.api_payload.ApiResponse; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.web.PageableDefault; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/api/v2/alarms") | ||
public class AlarmController { | ||
private final AlarmService alarmService; | ||
|
||
@GetMapping("") | ||
public ApiResponse<AlarmElements> getAllAlarms( | ||
@PageableDefault(30) final Pageable pageable | ||
) { | ||
return ApiResponse.onSuccess(alarmService.getAllAlarms(pageable)); | ||
} | ||
|
||
@PostMapping("/{alarmId}") | ||
public ApiResponse<Void> checkAlarm( | ||
@PathVariable("alarmId") Long alarmId | ||
) { | ||
return ApiResponse.of(alarmService.checkAlarm(alarmId)); | ||
} | ||
} |
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,6 @@ | ||
package com.apps.pochak.alarm.domain; | ||
|
||
public enum AlarmType { | ||
OWNER_COMMENT, TAGGED_COMMENT, COMMENT_REPLY, | ||
FOLLOW, LIKE, TAG_APPROVAL | ||
} |
33 changes: 0 additions & 33 deletions
33
src/main/java/com/apps/pochak/alarm/domain/CommentAlarm.java
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
src/main/java/com/apps/pochak/alarm/domain/FollowAlarm.java
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
src/main/java/com/apps/pochak/alarm/domain/TagApprovalAlarm.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.