mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-29 18:37:58 +03:00
Add support for syncing from bms-course-lookup.json
This commit is contained in:
@@ -11,7 +11,13 @@ import { BulkWriteOperation } from "mongodb";
|
||||
import { ICollection } from "monk";
|
||||
import os from "os";
|
||||
import path from "path";
|
||||
import { ChartDocument, FolderDocument, SongDocument, TableDocument } from "tachi-common";
|
||||
import {
|
||||
ChartDocument,
|
||||
FolderDocument,
|
||||
SongDocument,
|
||||
TableDocument,
|
||||
BMSCourseDocument,
|
||||
} from "tachi-common";
|
||||
import { InitaliseFolderChartLookup } from "utils/folder";
|
||||
|
||||
interface SyncInstructions {
|
||||
@@ -229,6 +235,14 @@ const syncInstructions: SyncInstructions[] = [
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
pattern: /^bms-course-lookup$/u,
|
||||
handler: (
|
||||
bmsCourseDocuments: BMSCourseDocument[],
|
||||
collection: ICollection<BMSCourseDocument>,
|
||||
logger
|
||||
) => GenericUpsert(bmsCourseDocuments, collection, "md5sums", logger),
|
||||
},
|
||||
];
|
||||
|
||||
const logger = CreateLogCtx("Database Sync");
|
||||
|
||||
Reference in New Issue
Block a user