public IActionResult MarkAs( string id, [FromQuery(Name = "type")] int type, [FromQuery(Name = "title")] string title, [FromQuery(Name = "description")] string description, [FromQuery(Name = "lat")] float lat, [FromQuery(Name = "lng")] float lng ) { try { string userId = User.FindFirst(ClaimTypes.PrimarySid).Value; var markedAnimal = _privateProfileService.MarkAs( userId, new Guid(id), (DAL.Enum.Status)type, title, description, CoordinateMapper.AtoS(new Coordinate() { Latitude = lat, Longitude = lng }) ); return(Ok(RegisteredAnimalMapper.StoA(markedAnimal))); } catch (ApiException exp) { return(StatusCode( exp.GetStatusCode(), Error.CreateBuilder().SetErrorMessage(exp.GetErrorMessage()).Build() )); } catch { return(BadRequest()); } }