Skip to content

Commit

Permalink
YEL-219 [deploy] 광고 enum 수정, 로그 추가 배포
Browse files Browse the repository at this point in the history
YEL-219 [deploy] 광고 enum 수정, 로그 추가 배포
  • Loading branch information
hyeonjeongs authored Feb 15, 2024
2 parents 785c66a + 13a8d9a commit 3cd3264
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
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

0 comments on commit 3cd3264

Please sign in to comment.