fix date field in splatnet data

main 1.0.1
Rosalina 2023-03-04 19:09:06 -05:00
parent 499a9f8650
commit 0d647254e0
No known key found for this signature in database
2 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import type { StatInkPostBody, VsHistoryDetail } from "./types.ts"; import type { StatInkPostBody, VsHistoryDetail } from "./types.ts";
export const AGENT_NAME = "splashcat / s3si.ts"; export const AGENT_NAME = "splashcat / s3si.ts";
export const AGENT_VERSION = "1.0.0"; export const AGENT_VERSION = "1.0.1";
export const S3SI_VERSION = "0.3.1"; export const S3SI_VERSION = "0.3.1";
export const COMBINED_VERSION = `${AGENT_VERSION}/${S3SI_VERSION}`; export const COMBINED_VERSION = `${AGENT_VERSION}/${S3SI_VERSION}`;
export const NSOAPP_VERSION = "2.5.0"; export const NSOAPP_VERSION = "2.5.0";

View File

@ -54,6 +54,12 @@ export class MongoDBExporter implements GameExporter {
s3siVersion: S3SI_VERSION, s3siVersion: S3SI_VERSION,
exportDate: new Date(), exportDate: new Date(),
}; };
const splatNetData = {
...game.detail,
playedTime: new Date(game.detail.playedTime),
};
const body: const body:
{ {
data: Game, data: Game,
@ -62,7 +68,7 @@ export class MongoDBExporter implements GameExporter {
} & typeof common = { } & typeof common = {
...common, ...common,
data: game, data: game,
splatNetData: game.detail, splatNetData,
gameId: uniqueId, gameId: uniqueId,
}; };