public async Task <ActionResult <IEnumerable <Location> > > GetLocations() { var locations = await _repository.GetLocationsAsync(); if (locations == null || locations.ToList().Count == 0) { return(NotFound()); } return(Ok(locations)); }
public async Task <IActionResult> GetUserLocationsAsync() { var ret = await _repository.GetLocationsAsync(User); return(Ok(ret)); }