mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-30 02:48:01 +03:00
Merge branch 'hotfix/v2.1.14'
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tachi-server",
|
||||
"version": "2.1.13",
|
||||
"version": "2.1.14",
|
||||
"description": "A score tracking server.",
|
||||
"main": "js/index.js",
|
||||
"private": true,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
const MAJOR = 2;
|
||||
const MINOR = 1;
|
||||
const PATCH = 13;
|
||||
const PATCH = 14;
|
||||
|
||||
// As is with all front-facing zkldi projects, the version names for tachi-server
|
||||
// are from an album I like. In this case, the album is Portishead - Dummy.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable no-await-in-loop */
|
||||
// This script syncs this tachi instances database up with the tachi-database-seeds.
|
||||
|
||||
import db, { monkDB } from "external/mongo/db";
|
||||
import { monkDB } from "external/mongo/db";
|
||||
import fjsh from "fast-json-stable-hash";
|
||||
import { PullDatabaseSeeds } from "lib/database-seeds/repo";
|
||||
import CreateLogCtx, { KtLogger } from "lib/logger/logger";
|
||||
@@ -202,7 +202,13 @@ const syncInstructions: SyncInstructions[] = [
|
||||
collection: ICollection<FolderDocument>,
|
||||
logger
|
||||
) => {
|
||||
const r = await GenericUpsert(folders, collection, "folderID", logger, true);
|
||||
const r = await GenericUpsert(
|
||||
folders.filter((e) => TachiConfig.GAMES.includes(e.game)),
|
||||
collection,
|
||||
"folderID",
|
||||
logger,
|
||||
true
|
||||
);
|
||||
|
||||
if (r) {
|
||||
await InitaliseFolderChartLookup();
|
||||
@@ -212,15 +218,27 @@ const syncInstructions: SyncInstructions[] = [
|
||||
{
|
||||
pattern: /^tables/u,
|
||||
handler: (tables: TableDocument[], collection: ICollection<TableDocument>, logger) =>
|
||||
GenericUpsert(tables, collection, "tableID", logger, true),
|
||||
GenericUpsert(
|
||||
tables.filter((e) => TachiConfig.GAMES.includes(e.game)),
|
||||
collection,
|
||||
"tableID",
|
||||
logger,
|
||||
true
|
||||
),
|
||||
},
|
||||
{
|
||||
pattern: /^bms-course-lookup/u,
|
||||
handler: (
|
||||
handler: async (
|
||||
bmsCourseDocuments: BMSCourseDocument[],
|
||||
collection: ICollection<BMSCourseDocument>,
|
||||
logger
|
||||
) => GenericUpsert(bmsCourseDocuments, collection, "md5sums", logger),
|
||||
) => {
|
||||
if (TachiConfig.TYPE === "ktchi") {
|
||||
return;
|
||||
}
|
||||
|
||||
await GenericUpsert(bmsCourseDocuments, collection, "md5sums", logger);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user