public async Task <IActionResult> UpdateLocation([FromBody] SaveLocationModel saveLocationModel) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } return(Ok(await _locationService.UpdateLocation(saveLocationModel))); }
public async Task <IActionResult> CreateLocation([FromBody] SaveLocationModel saveLocationModel) { string userId = User.FindFirst(ClaimTypes.NameIdentifier).Value; if (!ModelState.IsValid) { return(BadRequest(ModelState)); } return(Ok(await _locationService.CreateLocation(saveLocationModel, userId))); }