renamed SearchResponse to ServiceItem and moved to shared package

This commit is contained in:
2026-06-30 04:52:45 +02:00
parent 47466a6c61
commit 3086b7e2ca
6 changed files with 18 additions and 14 deletions
@@ -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));
}