added searchMap methods

This commit is contained in:
SlimusMinus
2026-08-20 01:35:23 +03:00
parent e980f56c61
commit a44b6c42ba
7 changed files with 100 additions and 4 deletions

View File

@@ -0,0 +1,24 @@
package com.krylov.refound.controller;
import com.krylov.refound.dto.MapMarkerDto;
import com.krylov.refound.service.MapService;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1")
public class MapController {
private final MapService mapService;
@GetMapping("/posts/map")
public List<MapMarkerDto> getMapMarkers(@RequestParam(required = false) String type, @RequestParam(required = false) String category) {
return mapService.findAllWithCoordinates(type, category);
}
}