diff --git a/src/constant.ts b/src/constant.ts index 44a7fea..651e510 100644 --- a/src/constant.ts +++ b/src/constant.ts @@ -2,7 +2,7 @@ import type { StatInkPostBody, VsHistoryDetail } from "./types.ts"; export const AGENT_NAME = "s3si.ts"; export const S3SI_VERSION = "0.4.19"; -export const NSOAPP_VERSION = "2.10.1"; +export const NSOAPP_VERSION = "2.10.0"; export const WEB_VIEW_VERSION = "6.0.0-9f87c815"; export enum Queries { HomeQuery = diff --git a/src/iksm.ts b/src/iksm.ts index 9fb537d..c85070e 100644 --- a/src/iksm.ts +++ b/src/iksm.ts @@ -212,16 +212,18 @@ export async function getGToken( ); const respJson = await resp.json(); - const idToken2: string = respJson?.result?.webApiServerCredential + const idToken2: string | undefined = respJson?.result + ?.webApiServerCredential ?.accessToken; - const coralUserId: string = respJson?.result?.user?.id?.toString(); + const coralUserId: string | undefined = respJson?.result?.user?.id + ?.toString(); if (!idToken2 || !coralUserId) { throw new APIError({ response: resp, json: respJson, message: - `No idToken2 or coralUserId found. Please try again later. (${idToken2.length}, ${coralUserId.length})`, + `No idToken2 or coralUserId found. Please try again later. (${idToken2?.length}, ${coralUserId?.length})`, }); }