cleanup splashcat exporter slightly

splashcat-exporter
Rosalina 2023-12-03 18:05:48 -05:00
parent 0a90da9b21
commit ca88b0e490
No known key found for this signature in database
1 changed files with 2 additions and 12 deletions

View File

@ -8,8 +8,6 @@ import {
GameExporter, GameExporter,
Nameplate, Nameplate,
PlayerGear, PlayerGear,
StatInkPostBody,
VsHistoryDetail,
VsInfo, VsInfo,
VsPlayer, VsPlayer,
VsTeam, VsTeam,
@ -17,8 +15,6 @@ VsTeam,
import { base64, msgpack, Mutex } from "../../deps.ts"; import { base64, msgpack, Mutex } from "../../deps.ts";
import { APIError } from "../APIError.ts"; import { APIError } from "../APIError.ts";
import { import {
b64Number,
gameId,
parseHistoryDetailId, parseHistoryDetailId,
} from "../utils.ts"; } from "../utils.ts";
import { Env } from "../env.ts"; import { Env } from "../env.ts";
@ -61,13 +57,7 @@ class SplashcatAPI {
body: msgpack.encode(body), body: msgpack.encode(body),
}); });
const json: unknown = {}//await resp.json().catch(() => ({})); const json = await resp.json();
console.log(json)
// read the body again as text
const text = await resp.text();
console.log(text);
if (resp.status !== 200 && resp.status !== 201) { if (resp.status !== 200 && resp.status !== 201) {
throw new APIError({ throw new APIError({
@ -117,7 +107,7 @@ export class SplashcatExporter implements GameExporter {
} else { } else {
return { return {
status: "skip", status: "skip",
reason: "Splashcat API does not support Salmon Run", reason: "Splashcat does not support Salmon Run",
} }
} }
} }