mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-06 13:58:05 +03:00
Support Bistrover EXT.
This commit is contained in:
@@ -8,5 +8,6 @@ export const REV_2DXBMS = "Z";
|
||||
export const REV_OMNIMIX = "X";
|
||||
|
||||
export const EXT_HEROIC_VERSE = "2020092900";
|
||||
export const EXT_BISTROVER = "2021091500";
|
||||
|
||||
export const MODEL_SDVX3_KONASTE = "QCV";
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import { RequestHandler, Router } from "express";
|
||||
import db from "external/mongo/db";
|
||||
import { EXT_HEROIC_VERSE, MODEL_INFINITAS_2, REV_2DXBMS } from "lib/constants/ea3id";
|
||||
import {
|
||||
EXT_BISTROVER,
|
||||
EXT_HEROIC_VERSE,
|
||||
MODEL_INFINITAS_2,
|
||||
REV_2DXBMS,
|
||||
} from "lib/constants/ea3id";
|
||||
import { SYMBOL_TachiAPIAuth } from "lib/constants/tachi";
|
||||
import CreateLogCtx from "lib/logger/logger";
|
||||
import { ExpressWrappedScoreImportMain } from "lib/score-import/framework/express-wrapper";
|
||||
@@ -107,6 +112,8 @@ const RequireInf2ModelHeaderOrForceStatic: RequestHandler = async (req, res, nex
|
||||
return next();
|
||||
};
|
||||
|
||||
const supportedExts = [EXT_HEROIC_VERSE, EXT_BISTROVER];
|
||||
|
||||
const ValidateModelHeader: RequestHandler = (req, res, next) => {
|
||||
const swModel = req.header("X-Software-Model");
|
||||
|
||||
@@ -134,7 +141,7 @@ const ValidateModelHeader: RequestHandler = (req, res, next) => {
|
||||
return next(); // allow anything for inf2.
|
||||
}
|
||||
|
||||
if (softID.ext !== EXT_HEROIC_VERSE) {
|
||||
if (!supportedExts.includes(softID.ext)) {
|
||||
logger.info(
|
||||
`Rejected invalid Software Model ${softID.ext} from user ${req[SYMBOL_TachiAPIAuth]
|
||||
.userID!}.`
|
||||
|
||||
Reference in New Issue
Block a user