fix: `coral_user_id` is string

dumb-splashcat-thing
spacemeowx2 2023-06-05 17:06:42 +08:00
parent cdaf7f3f1f
commit cabfa8f8c0
4 changed files with 10 additions and 6 deletions

View File

@ -1,3 +1,7 @@
## 0.4.2
fix: `coral_user_id` is string
## 0.4.1
feat: add support for Challenges

View File

@ -8,7 +8,7 @@
},
"package": {
"productName": "s3si-ts",
"version": "0.4.1"
"version": "0.4.2"
},
"tauri": {
"allowlist": {
@ -93,4 +93,4 @@
}
]
}
}
}

View File

@ -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 {

View File

@ -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<IminkResponse> {