From cabfa8f8c03b96ba24473fd5275314dc1cc72a54 Mon Sep 17 00:00:00 2001 From: spacemeowx2 Date: Mon, 5 Jun 2023 17:06:42 +0800 Subject: [PATCH] fix: `coral_user_id` is string --- CHANGELOG.md | 4 ++++ gui/src-tauri/tauri.conf.json | 4 ++-- src/constant.ts | 2 +- src/iksm.ts | 6 +++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98ca018..bf25ed4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.2 + +fix: `coral_user_id` is string + ## 0.4.1 feat: add support for Challenges diff --git a/gui/src-tauri/tauri.conf.json b/gui/src-tauri/tauri.conf.json index a4867df..0d1e1f7 100644 --- a/gui/src-tauri/tauri.conf.json +++ b/gui/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "s3si-ts", - "version": "0.4.1" + "version": "0.4.2" }, "tauri": { "allowlist": { @@ -93,4 +93,4 @@ } ] } -} \ No newline at end of file +} diff --git a/src/constant.ts b/src/constant.ts index 43ed567..45e0056 100644 --- a/src/constant.ts +++ b/src/constant.ts @@ -1,7 +1,7 @@ import type { StatInkPostBody, VsHistoryDetail } from "./types.ts"; export const AGENT_NAME = "s3si.ts"; -export const S3SI_VERSION = "0.4.1"; +export const S3SI_VERSION = "0.4.2"; export const NSOAPP_VERSION = "2.5.1"; export const WEB_VIEW_VERSION = "4.0.0-d5178440"; export enum Queries { diff --git a/src/iksm.ts b/src/iksm.ts index 5c1c5fa..3f55fbf 100644 --- a/src/iksm.ts +++ b/src/iksm.ts @@ -213,7 +213,7 @@ export async function getGToken( const idToken2: string = respJson?.result?.webApiServerCredential ?.accessToken; - const coralUserId: number = respJson?.result?.user?.id; + const coralUserId: string = respJson?.result?.user?.id?.toString(); if (!idToken2 || !coralUserId) { throw new APIError({ @@ -226,7 +226,7 @@ export async function getGToken( return [idToken2, coralUserId] as const; }; - const getGToken = async (idToken: string, coralUserId: number) => { + const getGToken = async (idToken: string, coralUserId: string) => { const { f, request_id: requestId, timestamp } = await callImink({ step: 2, idToken, @@ -414,7 +414,7 @@ async function callImink( step: number; idToken: string; userId: string; - coralUserId?: number; + coralUserId?: string; env: Env; }, ): Promise {