There is a scafolded function in src/main/java/dev/findfirst/core/controller/SearchController.java`:
@GetMapping("/api/search/tags")
public ResponseEntity<List<BookmarkDTO>> bookmarkSearchByTag(
@Valid @RequestBody SearchBkmkByTagReq searchBkmkByTagReq) {
// TODO finish
return new Response<>(List.of(new BookmarkDTO(0, null, null, null, false, null, null, null)),
HttpStatus.OK).get();
}
Use this function from the TagJDBCRepository:
@Query("SELECT * FROM Tag t WHERE t.user_id = :userId AND t.tag_title IN :tagTitles ")
List<TagDTO> findByTagTitles(@Param("tagTitles") List<String> tagTitles,
@Param("tenantID") int userId);
Tasks
[ ] Add response entity return of BookmarkDTOs of Bookmarks with Tags provided from the user
[ ] Add unit tests using TestContainers to flex the SearchController
Use the BookmarkControllerTest.java as an example of how to leverage TestContainers and perform sign in.
Details
There is a scafolded function in src/main/java/dev/findfirst/core/controller/SearchController.java`:
Use this function from the TagJDBCRepository:
Tasks
BookmarkControllerTest.java
as an example of how to leverage TestContainers and perform sign in.