Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YEL-219 [deploy] 광고 enum 수정, 로그 추가 배포 #450

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,15 @@ public BaseResponse<EventRewardResponse> rewardEvent(@AccessTokenUser User user,
@GetMapping("/v1/admob/verify")
public ResponseEntity<?> verifyAdmob(HttpServletRequest request) {
URI uri;
System.out.println(request.getQueryString() + " alalalalalal");
try {
uri =
new URI(request.getScheme(), null, request.getServerName(), request.getServerPort(),
request.getRequestURI(), request.getQueryString(), null);
} catch (URISyntaxException e) {
throw new EventBadRequestException(ADMOB_URI_BAD_REQUEST_EXCEPTION);
}
System.out.println("URIIIII : " + uri);
eventService.verifyAdmobReward(uri, request);

return new ResponseEntity<>(HttpStatus.OK);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
@Getter
@RequiredArgsConstructor
public enum EventType {
ADMOB("ADMOB"),
ADMOB_POINT("ADMOB_POINT"),
ADMOB_MULTIPLE_POINT("ADMOB_MULTIPLE_POINT"),
LUNCH_EVENT("LUNCH_EVENT");

private final String initial;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ public ResponseEntity<BaseResponse> BadRequestException(
AppleBadRequestException.class,
UserAdminBadRequestException.class,
EnumIllegalArgumentException.class,
IllegalArgumentException.class,
EventBadRequestException.class
IllegalArgumentException.class
})
public ResponseEntity<BaseResponse> BadRequestException(CustomException exception) {
return ResponseEntity.status(BAD_REQUEST)
Expand Down Expand Up @@ -196,7 +195,8 @@ public ResponseEntity<BaseResponse> ForbiddenException(CustomException exception
UserAdminNotFoundException.class,
NoticeNotFoundException.class,
AdminConfigurationNotFoundException.class,
EventNotFoundException.class
EventNotFoundException.class,
EventBadRequestException.class
})
public ResponseEntity<BaseResponse> NotFoundException(CustomException exception) {
return ResponseEntity.status(NOT_FOUND)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.yello.server.domain.event.medium;

import static com.yello.server.domain.event.entity.EventType.ADMOB;
import static com.yello.server.domain.event.entity.EventType.ADMOB_POINT;
import static com.yello.server.domain.event.entity.EventType.LUNCH_EVENT;
import static com.yello.server.global.common.util.ConstantUtil.GlobalZoneId;
import static org.mockito.ArgumentMatchers.any;
Expand Down Expand Up @@ -174,7 +174,7 @@ void init() {
.image("https://storage.googleapis.com/yelloworld/image/coin-stack.svg")
.build();
final Event admobEvent = Event.builder()
.tag(ADMOB)
.tag(ADMOB_POINT)
.startDate(ZonedDateTime.of(2024, 1, 1, 0, 0, 0, 0, GlobalZoneId))
.endDate(ZonedDateTime.of(2024, 12, 31, 0, 0, 0, 0, GlobalZoneId))
.title("ADMOB 광고입니다.")
Expand Down Expand Up @@ -286,7 +286,7 @@ void init() {
.image("https://storage.googleapis.com/yelloworld/image/coin-stack.svg")
.build();
final Event admobEvent = Event.builder()
.tag(ADMOB)
.tag(ADMOB_POINT)
.startDate(ZonedDateTime.of(2024, 1, 1, 0, 0, 0, 0, GlobalZoneId))
.endDate(ZonedDateTime.of(2024, 12, 31, 0, 0, 0, 0, GlobalZoneId))
.title("ADMOB 광고입니다.")
Expand Down Expand Up @@ -351,7 +351,7 @@ void init() {
.image("https://storage.googleapis.com/yelloworld/image/coin-stack.svg")
.build();
final Event admobEvent = Event.builder()
.tag(ADMOB)
.tag(ADMOB_POINT)
.startDate(ZonedDateTime.of(2024, 1, 1, 0, 0, 0, 0, GlobalZoneId))
.endDate(ZonedDateTime.of(2024, 12, 31, 0, 0, 0, 0, GlobalZoneId))
.title("ADMOB 광고입니다.")
Expand Down Expand Up @@ -437,7 +437,7 @@ void init() {
// given
final String idempotencyKey = "0397b5f3-ecdc-47d6-b5d7-2b1afcf00e87";
final EventJoinRequest request = EventJoinRequest.builder()
.tag(ADMOB.getInitial())
.tag(ADMOB_POINT.getInitial())
.build();

doNothing()
Expand Down
Loading