protected internal void Equipment(Ship ship) { if (!EquipmentDashboardVisible) { Loading = true; Selected = ship; StateHasChanged(); if (!HangarService.RetrieveHangarDetailView(ship.ID, out HangarDetailView hangarDetailView, out string message)) { NotificationService.ShowError(message, "Failed to load equipment!"); } else { if (!AccountService.RetrieveAccountVault(out VaultView vaultView, out message, out _)) { NotificationService.ShowError(message, "Failed to load vault!"); } else { Hangar = hangarDetailView; Vault = vaultView; EquipmentDashboardVisible = true; } } Loading = false; StateHasChanged(); }
public async Task <IActionResult> Get(int id) { if (HttpContext.TryGetCurrentSession(out AccountSessionView accountSessionView)) { return(Ok(await HangarService.RetrieveHangarDetailView(accountSessionView.AccountID, id))); } return(Ok(ValidatedView <HangarDetailView> .Invalid(ErrorCode.OPERATION_FAILED))); }