add beatoraja-auth-documents to the db

This commit is contained in:
zkldi
2021-05-26 16:59:53 +01:00
parent 3f74577c42
commit 3e0920e089
4 changed files with 6 additions and 5 deletions
+3 -3
View File
@@ -61,7 +61,7 @@ dependencies:
express-session: 1.17.1
fast-json-stable-hash: 1.0.2
fast-xml-parser: 3.19.0
kamaitachi-common: github.com/zkldi/Kamaitachi-common/c20f4915738962a8ba867855f4f1bc2624be79be
kamaitachi-common: github.com/zkldi/Kamaitachi-common/0398d77719606979c88833b37bce8020958cf058
mongodb: 3.6.6
monk: 7.3.4
multer: 1.4.2
@@ -4344,8 +4344,8 @@ packages:
engines: {node: '>=6'}
dev: true
github.com/zkldi/Kamaitachi-common/c20f4915738962a8ba867855f4f1bc2624be79be:
resolution: {tarball: https://codeload.github.com/zkldi/Kamaitachi-common/tar.gz/c20f4915738962a8ba867855f4f1bc2624be79be}
github.com/zkldi/Kamaitachi-common/0398d77719606979c88833b37bce8020958cf058:
resolution: {tarball: https://codeload.github.com/zkldi/Kamaitachi-common/tar.gz/0398d77719606979c88833b37bce8020958cf058}
name: kamaitachi-common
version: 0.1.0
dependencies:
+1
View File
@@ -116,6 +116,7 @@ const db = {
"game-stats": monkDB.get<UserGameStats>("game-stats"),
"kai-auth-tokens": monkDB.get<KaiAuthDocument>("kai-auth-tokens"),
"usc-auth-tokens": monkDB.get<GenericAuthDocument>("usc-auth-tokens"),
"beatoraja-auth-tokens": monkDB.get<GenericAuthDocument>("beatoraja-auth-tokens"),
};
export default db;
@@ -21,7 +21,7 @@ router.get("/scores", async (req, res) => {
// @optimisable - This should be solved with a couple queries and a hashmap.
const beatorajaScores = await Promise.all(
scores.map((e) =>
KtchiPBScoreToBeatorajaFormat(e, chart, req[SYMBOL_KtchiData]!.beatorajaAuthDoc.userID)
KtchiPBScoreToBeatorajaFormat(e, chart, req[SYMBOL_KtchiData]!.beatorajaAuthDoc!.userID)
)
);
+1 -1
View File
@@ -37,6 +37,6 @@ export interface KtchiRequestData {
uscAuthDoc?: GenericAuthDocument;
uscChartDoc?: ChartDocument<"usc:Single">;
beatorajaAuthDocument?: GenericAuthDocument;
beatorajaAuthDoc?: GenericAuthDocument;
beatorajaChartDoc?: ChartDocument<"bms:7K" | "bms:14K">;
}