コード例 #1
0
    public IActionResult PostRenameContainer(int id, string name)
    {
        Attempt <OperationResult <OperationResultType, EntityContainer>?> result =
            _contentTypeService.RenameContainer(id, name, _backofficeSecurityAccessor.BackOfficeSecurity?.CurrentUser?.Id ?? -1);

        if (result.Success)
        {
            return(Ok(result.Result)); //return the id
        }

        return(ValidationProblem(result.Exception?.Message));
    }
コード例 #2
0
        public IActionResult PostRenameContainer(int id, string name)
        {
            var result = _contentTypeService.RenameContainer(id, name, _backofficeSecurityAccessor.BackOfficeSecurity.CurrentUser.Id);

            if (result.Success)
            {
                return(Ok(result.Result)); //return the id
            }
            else
            {
                return(ValidationProblem(result.Exception.Message));
            }
        }