From 2cca0e36c5ab60082c9f6b03739742bd2dbc331a Mon Sep 17 00:00:00 2001 From: Christopher Cooper Date: Tue, 27 Dec 2022 10:07:37 +0900 Subject: [PATCH] fixes from latest staging --- client/src/app/routes/ImportRoutes.tsx | 2 +- .../import-types/file/wacca-mypage-scraper/class-handler.ts | 2 +- .../import-types/file/wacca-mypage-scraper/converter.ts | 6 +++--- .../import-types/file/wacca-mypage-scraper/parser.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/app/routes/ImportRoutes.tsx b/client/src/app/routes/ImportRoutes.tsx index 44eda4872..93e4d70a5 100644 --- a/client/src/app/routes/ImportRoutes.tsx +++ b/client/src/app/routes/ImportRoutes.tsx @@ -183,7 +183,7 @@ export default function ImportRoutes() { - + diff --git a/server/src/lib/score-import/import-types/file/wacca-mypage-scraper/class-handler.ts b/server/src/lib/score-import/import-types/file/wacca-mypage-scraper/class-handler.ts index 2588774a5..7ce49f1bd 100644 --- a/server/src/lib/score-import/import-types/file/wacca-mypage-scraper/class-handler.ts +++ b/server/src/lib/score-import/import-types/file/wacca-mypage-scraper/class-handler.ts @@ -1,5 +1,5 @@ import ScoreImportFatalError from "../../../framework/score-importing/score-import-error"; -import { WACCA_STAGEUPS } from "lib/constants/classes"; +import { WACCA_STAGEUPS } from "tachi-common"; import type { ClassHandler } from "../../../framework/user-game-stats/types"; import type { MyPagePlayerStage } from "./types"; diff --git a/server/src/lib/score-import/import-types/file/wacca-mypage-scraper/converter.ts b/server/src/lib/score-import/import-types/file/wacca-mypage-scraper/converter.ts index 05292a622..240c7c14b 100644 --- a/server/src/lib/score-import/import-types/file/wacca-mypage-scraper/converter.ts +++ b/server/src/lib/score-import/import-types/file/wacca-mypage-scraper/converter.ts @@ -1,7 +1,7 @@ import { InternalFailure, InvalidScoreFailure, - KTDataNotFoundFailure, + SongOrChartNotFoundFailure, } from "lib/score-import/framework/common/converter-failures"; import { GenericGetGradeAndPercent } from "lib/score-import/framework/common/score-utils"; import { FindChartWithPTDF } from "utils/queries/charts"; @@ -30,7 +30,7 @@ const ConvertMyPageScraperRecordsCSV: ConverterFunction< const song = await FindSongOnTitle("wacca", data.songTitle); if (song === null) { - throw new KTDataNotFoundFailure( + throw new SongOrChartNotFoundFailure( `Could not find song for ${data.songTitle}.`, importType, data, @@ -49,7 +49,7 @@ const ConvertMyPageScraperRecordsCSV: ConverterFunction< const chart = await FindChartWithPTDF("wacca", song.id, "Single", difficulty); if (chart === null) { - throw new KTDataNotFoundFailure( + throw new SongOrChartNotFoundFailure( `Could not find chart for ${humanisedChartTitle}.`, importType, data, diff --git a/server/src/lib/score-import/import-types/file/wacca-mypage-scraper/parser.ts b/server/src/lib/score-import/import-types/file/wacca-mypage-scraper/parser.ts index 17d0fe298..5708fd053 100644 --- a/server/src/lib/score-import/import-types/file/wacca-mypage-scraper/parser.ts +++ b/server/src/lib/score-import/import-types/file/wacca-mypage-scraper/parser.ts @@ -1,7 +1,7 @@ import { CreateMyPageScraperClassHandler } from "./class-handler"; import ScoreImportFatalError from "../../../framework/score-importing/score-import-error"; import { parse, CsvError } from "csv-parse/sync"; -import p from "prudence"; +import { p } from "prudence"; import type { ParserFunctionReturns } from "../../common/types"; import type { MyPageRecordsRawCsvRecord, MyPageRecordsParsedPB } from "./types"; import type { KtLogger } from "lib/logger/logger";