From 099550cefa4de9783e9473282d0a9b7628a7c753 Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Fri, 25 Oct 2024 19:06:38 -0700 Subject: [PATCH] remove outdated code --- src/ui/admin-ui-handler.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/ui/admin-ui-handler.ts b/src/ui/admin-ui-handler.ts index 0b48b303823..269b5ac5096 100644 --- a/src/ui/admin-ui-handler.ts +++ b/src/ui/admin-ui-handler.ts @@ -150,17 +150,6 @@ export default class AdminUiHandler extends FormModalUiHandler { } else if (this.adminMode === AdminMode.ADMIN) { this.updateAdminPanelInfo(adminSearchResult, AdminMode.SEARCH); } - const onFail = (error: string) => { - this.scene.ui.setMode(Mode.ADMIN, Object.assign(this.config, { errorMessage: error?.trim() })); - this.scene.ui.playError(); - }; - if (!this.inputs[0].text) { - return onFail("Username is required"); - } - if (!this.inputs[1].text) { - return onFail("Discord Id is required"); - } - return false; }; return true; } @@ -288,7 +277,6 @@ export default class AdminUiHandler extends FormModalUiHandler { private async adminSearch(adminSearchResult: AdminSearchInfo) { try { - // const adminInfo = await Utils.apiFetch(`admin/account/adminSearch?username=${encodeURIComponent(adminSearchResult.username)}`, true); const [ adminInfo, errorType ] = await pokerogueApi.admin.searchAccount({ username: adminSearchResult.username }); if (errorType || !adminInfo) { // error - if adminInfo.status === this.httpUserNotFoundErrorCode that means the username can't be found in the db return { adminSearchResult: adminSearchResult, error: true, errorType };