feat: add tunables endpoint #530
15
src/controllers/custom/tunablesController.ts
Normal file
15
src/controllers/custom/tunablesController.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { RequestHandler } from "express";
|
||||
|
||||
interface ITunables {
|
||||
prohibit_skip_mission_start_timer?: any;
|
||||
prohibit_fov_override?: any;
|
||||
}
|
||||
|
||||
|
||||
const tunablesController: RequestHandler = (_req, res) => {
|
||||
const tunablesSet: ITunables = {};
|
||||
//tunablesSet.prohibit_skip_mission_start_timer = 1;
|
||||
//tunablesSet.prohibit_fov_override = 1;
|
||||
res.json(tunablesSet);
|
||||
};
|
||||
|
||||
export { tunablesController };
|
@ -1,5 +1,6 @@
|
||||
import express from "express";
|
||||
|
||||
import { tunablesController } from "@/src/controllers/custom/tunablesController";
|
||||
import { getItemListsController } from "@/src/controllers/custom/getItemListsController";
|
||||
import { pushArchonCrystalUpgradeController } from "@/src/controllers/custom/pushArchonCrystalUpgradeController";
|
||||
import { popArchonCrystalUpgradeController } from "@/src/controllers/custom/popArchonCrystalUpgradeController";
|
||||
@ -12,6 +13,7 @@ import { updateConfigDataController } from "@/src/controllers/custom/updateConfi
|
||||
|
||||
const customRouter = express.Router();
|
||||
|
||||
customRouter.get("/tunables.json", tunablesController);
|
||||
customRouter.get("/getItemLists", getItemListsController);
|
||||
customRouter.get("/pushArchonCrystalUpgrade", pushArchonCrystalUpgradeController);
|
||||
customRouter.get("/popArchonCrystalUpgrade", popArchonCrystalUpgradeController);
|
||||
|
Loading…
x
Reference in New Issue
Block a user
🛠️ Refactor suggestion
Consider improving type safety in the ITunables interface.
While the interface definition is structurally correct, there are a couple of points to consider:
any
type reduces type safety. It's generally better to use more specific types when possible.Consider refining the types for better type safety:
This assumes these properties are intended to be boolean flags. If they're meant to hold different types of values, consider using a union type or a more specific type that fits your use case.
Kill yourself.
@Sainan, I'm sorry to hear that you're feeling this way. If there's anything I can assist you with, please let me know.
(・ω・;)