mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-07 06:18:03 +03:00
Move GPT/goals to GPT/targets/goals
This commit is contained in:
@@ -18,7 +18,7 @@ import {
|
||||
import { GetUsersWithIDs } from "utils/user";
|
||||
import chartsRouter from "./charts/router";
|
||||
import foldersRouter from "./folders/router";
|
||||
import goalsRouter from "./goals/router";
|
||||
import goalsRouter from "./targets/goals/router";
|
||||
import { ValidatePlaytypeFromParam } from "./middleware";
|
||||
import scoresRouter from "./scores/router";
|
||||
import songIDRouter from "./songs/_songID/router";
|
||||
|
||||
+3
-3
@@ -15,7 +15,7 @@ const router: Router = Router({ mergeParams: true });
|
||||
/**
|
||||
* Retrieve goals that have been recently achieved for this game.
|
||||
*
|
||||
* @name GET /api/v1/games/:game/:playtype/goals/recently-achieved
|
||||
* @name GET /api/v1/games/:game/:playtype/targets/goals/recently-achieved
|
||||
*/
|
||||
router.get("/recently-achieved", async (req, res) => {
|
||||
const game = req[SYMBOL_TachiData]!.game!;
|
||||
@@ -81,7 +81,7 @@ const ResolveGoalID: RequestHandler = async (req, res, next) => {
|
||||
/**
|
||||
* Retrieve information about this goal and who is subscribed to it.
|
||||
*
|
||||
* @name GET /api/v1/games/:game/:playtype/goals/:goalID
|
||||
* @name GET /api/v1/games/:game/:playtype/targets/goals/:goalID
|
||||
*/
|
||||
router.get("/:goalID", ResolveGoalID, async (req, res) => {
|
||||
const goal = req[SYMBOL_TachiData]!.goalDoc!;
|
||||
@@ -108,7 +108,7 @@ router.get("/:goalID", ResolveGoalID, async (req, res) => {
|
||||
*
|
||||
* @param userID - The userID to evaluate this goal against. Must be a player of this GPT.
|
||||
*
|
||||
* @name GET /api/v1/games/:game/:playtype/goals/:goalID/evaluate
|
||||
* @name GET /api/v1/games/:game/:playtype/targets/goals/:goalID/evaluate
|
||||
*/
|
||||
router.get(
|
||||
"/:goalID/evaluate-for",
|
||||
@@ -0,0 +1,8 @@
|
||||
import { Router } from "express";
|
||||
import goalsRouter from "./goals/router";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
router.use("/goals", goalsRouter);
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user