renamed SearchResponse to ServiceItem and moved to shared package
This commit is contained in:
@@ -8,7 +8,7 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.vaessl.app.shared.ServiceItem;
|
||||
import com.vaessl.app.shared.SessionKeys;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpSession;
|
||||
@@ -26,7 +26,7 @@ public class SearchController {
|
||||
* there is no active session.
|
||||
*/
|
||||
@PostMapping("/search")
|
||||
public ResponseEntity<PagedSearchResponse<SearchResponse>> search(
|
||||
public ResponseEntity<PagedSearchResponse<ServiceItem>> search(
|
||||
@Valid @RequestBody SearchRequest request,
|
||||
@PageableDefault(size = 20) Pageable pageable, HttpServletRequest httpReq) {
|
||||
HttpSession session = httpReq.getSession(false);
|
||||
@@ -35,7 +35,7 @@ public class SearchController {
|
||||
return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();
|
||||
}
|
||||
|
||||
Page<SearchResponse> result = searchService.search(request, pageable);
|
||||
Page<ServiceItem> result = searchService.search(request, pageable);
|
||||
|
||||
return ResponseEntity.ok(PagedSearchResponse.from(result));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user