Exemplo n.º 1
0
        public async Task <IActionResult> GetAssetsPost(string app, [FromBody] QueryDto query)
        {
            var assets = await assetQuery.QueryAsync(Context, query?.ParentId, query?.ToQuery() ?? Q.Empty, HttpContext.RequestAborted);

            var response = Deferred.Response(() =>
            {
                return(AssetsDto.FromDomain(assets, Resources));
            });

            return(Ok(response));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> GetAssets(string app, [FromQuery] DomainId?parentId, [FromQuery] string?ids = null, [FromQuery] string?q = null)
        {
            var assets = await assetQuery.QueryAsync(Context, parentId, CreateQuery(ids, q), HttpContext.RequestAborted);

            var response = Deferred.Response(() =>
            {
                return(AssetsDto.FromDomain(assets, Resources));
            });

            return(Ok(response));
        }