-
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.
fix: 샵 좋아요/좋아요 취소 이벤트 중복 여부를 api 서버에서 처리하지 않도록 수정
Showing
3 changed files
with
16 additions
and
70 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,10 +63,9 @@ public ResponseMessage findShopList(@RequestParam(name = "type") final String se | |
* Shop 좋아요 이벤트 producer | ||
*/ | ||
@PostMapping("/v1/shops/likes/{id}") | ||
public DeferredResult<?> likeShop(@PathVariable(value = "id") @NotBlank final String shopId) { | ||
final DeferredResult<Object> deferredResult = new DeferredResult<>(); | ||
shopService.produceShopLikeEvent(deferredResult, shopId, "[email protected]"); | ||
return deferredResult; | ||
@ResponseStatus(code = HttpStatus.OK) | ||
public void likeShop(@PathVariable(value = "id") @NotBlank final String shopId) { | ||
shopService.produceShopLikeEvent(shopId, "[email protected]"); | ||
} | ||
|
||
/** | ||
|
@@ -82,10 +81,9 @@ public void batchShopLikes(@Valid @RequestBody final List<ShopLikeEvent> shopLik | |
* Shop 좋아요 취소 이벤트 producer | ||
*/ | ||
@DeleteMapping("/v1/shops/likes/{id}") | ||
public DeferredResult<?> cancelLikeShop(@PathVariable(value = "id") @NotBlank final String shopId) { | ||
final DeferredResult<Object> deferredResult = new DeferredResult<>(); | ||
shopService.produceShopLikeCancelEvent(deferredResult, shopId, "[email protected]"); | ||
return deferredResult; | ||
@ResponseStatus(code = HttpStatus.OK) | ||
public void cancelLikeShop(@PathVariable(value = "id") @NotBlank final String shopId) { | ||
shopService.produceShopLikeCancelEvent(shopId, "[email protected]"); | ||
} | ||
|
||
/** | ||
|
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