Example #1
0
        public async Task <IActionResult> GetApartments()
        {
            var host = await _hostService.LoggedHost();

            if (host != null)
            {
                return(Ok(await _apartmentService.ApartmentsList(host.Id)));
            }
            return(Unauthorized());
        }
Example #2
0
 public async Task <IActionResult> GetApartments()
 {
     return(Ok(await _apartmentService.ApartmentsList()));
 }