From 973b1d4ca8ab109a45ccbb473b81caa788a8da8b Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Sat, 20 Sep 2025 10:34:33 +0200 Subject: [PATCH] chore: delete PS field from requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It clutters the logs, and we don’t use this field anyway --- src/helpers/stringHelpers.ts | 4 +++- src/services/questService.ts | 1 - src/types/requestTypes.ts | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/helpers/stringHelpers.ts b/src/helpers/stringHelpers.ts index 3512c1ea..8122c9d4 100644 --- a/src/helpers/stringHelpers.ts +++ b/src/helpers/stringHelpers.ts @@ -2,7 +2,9 @@ import { JSONParse } from "json-with-bigint"; export const getJSONfromString = (str: string): T => { const jsonSubstring = str.substring(0, str.lastIndexOf("}") + 1); - return JSONParse(jsonSubstring) as T; + const obj = JSONParse(jsonSubstring) as T; + if (obj && typeof obj === "object" && "PS" in obj) delete obj.PS; + return obj; }; export const getSubstringFromKeyword = (str: string, keyword: string): string => { diff --git a/src/services/questService.ts b/src/services/questService.ts index d0a4a468..50dea17b 100644 --- a/src/services/questService.ts +++ b/src/services/questService.ts @@ -14,7 +14,6 @@ import type { ITypeCount } from "../types/commonTypes.ts"; export interface IUpdateQuestRequest { QuestKeys: Omit[]; - PS: string; questCompletion: boolean; PlayerShipEvents: unknown[]; crossPlaySetting: string; diff --git a/src/types/requestTypes.ts b/src/types/requestTypes.ts index 0dac8d75..8682d9ba 100644 --- a/src/types/requestTypes.ts +++ b/src/types/requestTypes.ts @@ -81,7 +81,6 @@ export type IMissionInventoryUpdateRequest = { hosts: string[]; currentClients: unknown[]; ChallengeProgress: IChallengeProgress[]; - PS: string; ActiveDojoColorResearch: string; RewardInfo?: IRewardInfo; NemesisKillConvert?: {