Exemple #1
0
        public async Task <ResultCode> ChangeBlockedStatusAsync(int accountId)
        {
            var account = await _accountStorage.GetByIdAsync(accountId);

            if (account == null)
            {
                return(ResultCode.NotFound);
            }
            account.IsBlocked = !account.IsBlocked;
            await _accountStorage.UpdateAsync(account);

            return(ResultCode.Success);
        }