Exemplo n.º 1
0
        public async Task <ActionResult <IEnumerable <Location> > > GetLocations()
        {
            var locations = await _repository.GetLocationsAsync();

            if (locations == null || locations.ToList().Count == 0)
            {
                return(NotFound());
            }

            return(Ok(locations));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> GetUserLocationsAsync()
        {
            var ret = await _repository.GetLocationsAsync(User);

            return(Ok(ret));
        }