public async Task <IActionResult> PutContentStatus(string app, string name, DomainId id, ChangeStatusDto request)
        {
            var command = request.ToCommand(id);

            var response = await InvokeCommandAsync(command);

            return(Ok(response));
        }
示例#2
0
        public async Task <IActionResult> PutContentStatus(string app, string name, Guid id, ChangeStatusDto request)
        {
            await contentQuery.GetSchemaOrThrowAsync(Context, name);

            var command = request.ToCommand(id);

            var response = await InvokeCommandAsync(command);

            return(Ok(response));
        }
示例#3
0
        public async Task <IActionResult> PutContentStatus(string app, string name, Guid id, ChangeStatusDto request)
        {
            await contentQuery.GetSchemaOrThrowAsync(Context(), name);

            if (!this.HasPermission(Helper.StatusPermission(app, name, Status.Published)))
            {
                return(new ForbidResult());
            }

            var command = request.ToCommand(id);

            var response = await InvokeCommandAsync(app, name, command);

            return(Ok(response));
        }