public async Task <IActionResult> GetApps() { var userOrClientId = HttpContext.User.UserOrClientId() !; var userPermissions = Resources.Permissions; var apps = await appProvider.GetUserAppsAsync(userOrClientId, userPermissions); var response = Deferred.Response(() => { return(apps.OrderBy(x => x.Name).Select(a => AppDto.FromApp(a, userOrClientId, appPlansProvider, Resources)).ToArray()); }); Response.Headers[HeaderNames.ETag] = apps.ToEtag(); return(Ok(response)); }
public async Task <IActionResult> GetApps() { var userOrClientId = HttpContext.User.UserOrClientId() !; var userPermissions = Resources.Context.UserPermissions; var apps = await appProvider.GetUserAppsAsync(userOrClientId, userPermissions, HttpContext.RequestAborted); var response = Deferred.Response(() => { var isFrontend = HttpContext.User.IsInClient(DefaultClients.Frontend); return(apps.OrderBy(x => x.Name).Select(a => AppDto.FromDomain(a, userOrClientId, isFrontend, Resources)).ToArray()); }); Response.Headers[HeaderNames.ETag] = apps.ToEtag(); return(Ok(response)); }