From 300c3d58138bd831bb4b7b302ca4672ee14aa8f4 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Fri, 19 Nov 2021 11:05:38 +0000 Subject: [PATCH] Add debug message for handling orphan document. --- server/package.json | 2 +- server/pnpm-lock.yaml | 8 ++++---- server/src/lib/score-import/framework/orphans/orphans.ts | 4 +++- .../import-types/ir/fervidex-static/converter.ts | 1 - 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/server/package.json b/server/package.json index 4e6529b9f..96c48dbe1 100644 --- a/server/package.json +++ b/server/package.json @@ -65,7 +65,7 @@ "express-async-errors": "3.1.1", "express-rate-limit": "5.2.6", "express-session": "1.17.2", - "fast-json-stable-hash": "1.0.2", + "fast-json-stable-hash": "1.0.3", "fast-xml-parser": "3.19.0", "helmet": "4.6.0", "json5": "2.2.0", diff --git a/server/pnpm-lock.yaml b/server/pnpm-lock.yaml index 5cab4947c..ec256bf15 100644 --- a/server/pnpm-lock.yaml +++ b/server/pnpm-lock.yaml @@ -42,7 +42,7 @@ specifiers: express-rate-limit: 5.2.6 express-request-mock: 3.1.0 express-session: 1.17.2 - fast-json-stable-hash: 1.0.2 + fast-json-stable-hash: 1.0.3 fast-xml-parser: 3.19.0 helmet: 4.6.0 json5: 2.2.0 @@ -87,7 +87,7 @@ dependencies: express-async-errors: 3.1.1_express@4.17.1 express-rate-limit: 5.2.6 express-session: 1.17.2 - fast-json-stable-hash: 1.0.2 + fast-json-stable-hash: 1.0.3 fast-xml-parser: 3.19.0 helmet: 4.6.0 json5: 2.2.0 @@ -2777,8 +2777,8 @@ packages: micromatch: 4.0.4 dev: true - /fast-json-stable-hash/1.0.2: - resolution: {integrity: sha512-p7Sr7IjiqJkFuRx1P6tYVTDwBf+ZfXyU2l3bv5XkBhiey5G3fHzBUJiEnpIlAZjGedXpEJM/V2SV+hD0pOnmmg==} + /fast-json-stable-hash/1.0.3: + resolution: {integrity: sha512-iLK3Tq2J/KbiUn/5OHyhxikHqzwFXSM2e803Dp2JtBdQjsCVuZwWvL+WqWXPPRUEuDX4c0kqID1SU84RCfxs3A==} dev: false /fast-json-stable-stringify/2.1.0: diff --git a/server/src/lib/score-import/framework/orphans/orphans.ts b/server/src/lib/score-import/framework/orphans/orphans.ts index 46c04d52a..297765b49 100644 --- a/server/src/lib/score-import/framework/orphans/orphans.ts +++ b/server/src/lib/score-import/framework/orphans/orphans.ts @@ -37,10 +37,12 @@ export async function OrphanScore( const orphan: Pick = { importType, data, - context: context, + context, userID, }; + logger.debug("Orphaning document", orphan); + const orphanID = `O${fjsh.hash(orphan, "sha256")}`; const exists = await db["orphan-scores"].findOne({ orphanID }); diff --git a/server/src/lib/score-import/import-types/ir/fervidex-static/converter.ts b/server/src/lib/score-import/import-types/ir/fervidex-static/converter.ts index 510239944..d9435c3d2 100644 --- a/server/src/lib/score-import/import-types/ir/fervidex-static/converter.ts +++ b/server/src/lib/score-import/import-types/ir/fervidex-static/converter.ts @@ -1,5 +1,4 @@ import { Lamps } from "tachi-common"; -import { DeleteUndefinedProps } from "utils/misc"; import { FindChartOnInGameIDVersion } from "utils/queries/charts"; import { FindSongOnID } from "utils/queries/songs"; import {