-
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.
Merge pull request #23 from Findy-org/refactor/카이젠
[FINDY-36] refactor: 카이젠
- Loading branch information
Showing
45 changed files
with
535 additions
and
295 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
4 changes: 2 additions & 2 deletions
4
src/main/java/org/findy/findy_be/bookmark/application/register/RegisterYoutubeBookmark.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,9 +1,9 @@ | ||
package org.findy.findy_be.bookmark.application.register; | ||
|
||
import org.findy.findy_be.bookmark.dto.request.YoutubeBookmarkRequest; | ||
import org.findy.findy_be.bookmark.dto.request.RegisterYoutubeBookmarkRequest; | ||
import org.findy.findy_be.user.domain.User; | ||
|
||
public interface RegisterYoutubeBookmark { | ||
|
||
void invoke(final User user, final YoutubeBookmarkRequest request); | ||
void invoke(final User user, final RegisterYoutubeBookmarkRequest request); | ||
} |
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
42 changes: 42 additions & 0 deletions
42
src/main/java/org/findy/findy_be/marker/api/MarkerController.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,42 @@ | ||
package org.findy.findy_be.marker.api; | ||
|
||
import org.findy.findy_be.common.dto.pagination.request.PagedRequest; | ||
import org.findy.findy_be.common.dto.pagination.response.SliceResponse; | ||
import org.findy.findy_be.common.meta.LoginUser; | ||
import org.findy.findy_be.marker.api.swagger.MarkerAPIPresentation; | ||
import org.findy.findy_be.marker.application.find.FindAllPagedMarkers; | ||
import org.findy.findy_be.marker.application.register.RegisterMarker; | ||
import org.findy.findy_be.marker.dto.request.RegisterSearchedMarkerRequest; | ||
import org.findy.findy_be.place.dto.response.PlaceResponse; | ||
import org.findy.findy_be.user.domain.User; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.ModelAttribute; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
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 jakarta.validation.Valid; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@RestController | ||
@RequestMapping("/api/markers") | ||
@RequiredArgsConstructor | ||
public class MarkerController implements MarkerAPIPresentation { | ||
|
||
private final RegisterMarker registerMarker; | ||
private final FindAllPagedMarkers findAllPagedMarkers; | ||
|
||
@PostMapping("/{bookmarkId}") | ||
public void registerMarker(@LoginUser User user, @PathVariable("bookmarkId") Long bookmarkId, | ||
@Valid @RequestBody RegisterSearchedMarkerRequest request) { | ||
registerMarker.invoke(bookmarkId, request, user.getUserId()); | ||
} | ||
|
||
@GetMapping("/{bookmarkId}") | ||
public SliceResponse<PlaceResponse> getMarkers(@LoginUser User user, @PathVariable("bookmarkId") Long bookmarkId, | ||
@ModelAttribute PagedRequest request) { | ||
return findAllPagedMarkers.invoke(user.getUserId(), bookmarkId, request.cursor(), request.size()); | ||
} | ||
} |
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
6 changes: 3 additions & 3 deletions
6
.../application/find/FindAllPagedPlaces.java → ...application/find/FindAllPagedMarkers.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,8 +1,8 @@ | ||
package org.findy.findy_be.place.application.find; | ||
package org.findy.findy_be.marker.application.find; | ||
|
||
import org.findy.findy_be.common.dto.pagination.response.SliceResponse; | ||
import org.findy.findy_be.place.dto.response.PlaceResponse; | ||
|
||
public interface FindAllPagedPlaces { | ||
SliceResponse<PlaceResponse> invoke(final String userId, final Long bookId, final Long cursor, final int size); | ||
public interface FindAllPagedMarkers { | ||
SliceResponse<PlaceResponse> invoke(final String userId, final Long bookmarkId, final Long cursor, final int size); | ||
} |
Oops, something went wrong.