Пример #1
0
        public async Task <ActionResult <TaskAttribute> > Get([Required] Guid id, CancellationToken ct = default)
        {
            var attribute = await _taskAttributesService.GetAsync(id, false, ct);

            if (attribute == null)
            {
                return(NotFound(id));
            }

            return(ReturnIfAllowed(attribute, Roles.Tasks, attribute.AccountId));
        }
Пример #2
0
        public async Task <ActionResult <TaskAttributeChangeGetPagedListResponse> > GetPagedList(
            TaskAttributeChangeGetPagedListRequest request,
            CancellationToken ct = default)
        {
            var attribute = await _taskAttributesService.GetAsync(request.AttributeId, false, ct);

            var response = await _taskAttributeChangesService.GetPagedListAsync(request, ct);

            return(ReturnIfAllowed(response, Roles.Tasks, attribute.AccountId));
        }