public async Task <ActionResult <List <GroupDownloadModel> > > GetAllUsersGroupsAsync() { try { if (await IsUserValidAsync()) { var usersGroups = await GroupModel.GetAllUsersGroupsAsync( ExtractUserIdFromToken(), RepositoryManager); var usersGroupsDownloadModels = MapEntitiesToDownloadModels <Domain.Entities.Group, GroupDownloadModel>(usersGroups); return(Ok(usersGroupsDownloadModels)); } else { return(Unauthorized()); } } catch (Exception err) { LogException(err); return(Problem()); } }