mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-11 08:48:15 +03:00
Course support
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
import db from "../../../src/external/mongo/db";
|
||||
|
||||
(async () => {
|
||||
const data = JSON.parse(fs.readFileSync(path.join(__dirname, "courses.json"), "utf-8"));
|
||||
|
||||
await db["bms-course-lookup"].insert(data);
|
||||
})();
|
||||
@@ -82,6 +82,9 @@ const staticIndexes: Partial<Record<ValidDatabases, Index[]>> = {
|
||||
),
|
||||
index({ "data.hashSHA256": 1 }),
|
||||
],
|
||||
"bms-course-lookup": [index({ md5sums: 1 }, UNIQUE)],
|
||||
"beatoraja-auth-tokens": [index({ token: 1 }, UNIQUE)],
|
||||
"usc-auth-tokens": [index({ token: 1 }, UNIQUE)],
|
||||
};
|
||||
|
||||
const indexes: Partial<Record<ValidDatabases, Index[]>> = staticIndexes;
|
||||
|
||||
Reference in New Issue
Block a user