aboutsummaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
Diffstat (limited to 'Backend')
-rw-r--r--Backend/Api/Api/Controllers/LocationController.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Backend/Api/Api/Controllers/LocationController.cs b/Backend/Api/Api/Controllers/LocationController.cs
index c9ef9ba..ba9c9a8 100644
--- a/Backend/Api/Api/Controllers/LocationController.cs
+++ b/Backend/Api/Api/Controllers/LocationController.cs
@@ -51,10 +51,15 @@ namespace Api.Controllers
return BadRequest();
}
- [HttpPost("search")]
+ [HttpGet("search")]
[Authorize(Roles = "User")]
- public async Task<ActionResult<List<Location>>> searchLocation(int searchtype ,string? query,Coords? coords)
+ public async Task<ActionResult<List<Location>>> searchLocation(int searchtype ,string? query,double? latitude,double? longitude)
{
+ Coords coords = new Coords();
+ if (latitude!=null && longitude!=null) {
+ coords.latitude = (double)latitude;
+ coords.longitude = (double)longitude;
+ }
List<Location> ret = new List<Location>();
switch (searchtype)
{