コード例 #1
0
        public async Task <ActionResult> Get(int accountId)
        {
            try
            {
                Guard.AgainstAccountNumberMismatch(GetAccountIdClaim(), accountId.ToString(), "userClaim.accountId", "accountId");
                var batteryTypes = await _batteryService.ListBatteryTypesAsync(accountId);

                return(Ok(batteryTypes.ToArray()));
            }
            catch (AccountConflictException)
            {
                return(Forbid());
            }
        }