aboutsummaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
authorbranislav.radivojevic <wafflemynxyt@gmail.com>2022-11-28 14:10:47 +0100
committerbranislav.radivojevic <wafflemynxyt@gmail.com>2022-11-28 14:10:47 +0100
commitd655cdb342edafbf6c0179349cf4f4b335302681 (patch)
treeda917db3aa4cbc7f2e36215b55e674f8311c59e9 /Backend
parent78caf6a59402f930b0d828bc6ce5faac1c5b4ed4 (diff)
parenta0c779057e0c1d3c223593e38372adfc00e85d7d (diff)
Merge branch 'develop' of http://gitlab.pmf.kg.ac.rs/BrzoDoLokacije2022/odyssey/brzodolokacije into develop
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)
{