feat: more work on clans
This commit is contained in:
parent
376b75be39
commit
de326fd4dd
@ -19,7 +19,7 @@ const createGuildController: RequestHandler = async (req, res) => {
|
||||
// Set GuildId
|
||||
inventory.GuildId = guild._id;
|
||||
|
||||
// Give clan key
|
||||
// Give clan key (TODO: This should only be a blueprint)
|
||||
inventory.LevelKeys ??= [];
|
||||
inventory.LevelKeys.push({
|
||||
ItemType: "/Lotus/Types/Keys/DojoKey",
|
||||
|
13
src/controllers/api/createGuildDojoController.ts
Normal file
13
src/controllers/api/createGuildDojoController.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { RequestHandler } from "express";
|
||||
|
||||
export const createGuildDojoController: RequestHandler = (_req, res) => {
|
||||
// _req.body.toString() -> {"SpawnComponent":{"id":{"$oid":"000000000000000000000000"},"pf":"/Lotus/Levels/ClanDojo/DojoHall.level","ppf":""}}
|
||||
|
||||
// I'm guessing the response is same as getGuildDojo.php, but I have yet to log one of those for a fresh clan.
|
||||
// This works to make the client load in, but can't build new rooms.
|
||||
res.json({
|
||||
DojoComponents: [
|
||||
{"pf":"/Lotus/Levels/ClanDojo/DojoHall.level","ppf":""}
|
||||
]
|
||||
});
|
||||
};
|
5
src/controllers/api/dojoController.ts
Normal file
5
src/controllers/api/dojoController.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { RequestHandler } from "express";
|
||||
|
||||
export const dojoController: RequestHandler = (_req, res) => {
|
||||
res.json("-1"); // Tell client to use authorised request.
|
||||
};
|
5
src/controllers/api/getGuildDojoController.ts
Normal file
5
src/controllers/api/getGuildDojoController.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { RequestHandler } from "express";
|
||||
|
||||
export const getGuildDojoController: RequestHandler = (_req, res) => {
|
||||
res.json({}); // This is what I got for a fresh clan.
|
||||
};
|
11
src/controllers/api/getGuildLogController.ts
Normal file
11
src/controllers/api/getGuildLogController.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { RequestHandler } from "express";
|
||||
|
||||
export const getGuildLogController: RequestHandler = (_req, res) => {
|
||||
res.json({
|
||||
RoomChanges: [],
|
||||
TechChanges: [],
|
||||
RosterActivity: [],
|
||||
StandingsUpdates: [],
|
||||
ClassChanges: []
|
||||
});
|
||||
};
|
5
src/controllers/api/guildTechController.ts
Normal file
5
src/controllers/api/guildTechController.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { RequestHandler } from "express";
|
||||
|
||||
export const guildTechController: RequestHandler = (_req, res) => {
|
||||
res.status(500).end(); // This is what I got for a fresh clan.
|
||||
};
|
@ -48,6 +48,11 @@ import { sellController } from "@/src/controllers/api/sellController";
|
||||
import { upgradesController } from "@/src/controllers/api/upgradesController";
|
||||
import { setSupportedSyndicateController } from "@/src/controllers/api/setSupportedSyndicateController";
|
||||
import { getDailyDealStockLevelsController } from "@/src/controllers/api/getDailyDealStockLevelsController";
|
||||
import { getGuildLogController } from "../controllers/api/getGuildLogController";
|
||||
import { guildTechController } from "../controllers/api/guildTechController";
|
||||
import { dojoController } from "@/src/controllers/api/dojoController";
|
||||
import { getGuildDojoController } from "@/src/controllers/api/getGuildDojoController";
|
||||
import { createGuildDojoController } from "@/src/controllers/api/createGuildDojoController";
|
||||
|
||||
const apiRouter = express.Router();
|
||||
|
||||
@ -77,6 +82,9 @@ apiRouter.get("/setActiveShip.php", setActiveShipController);
|
||||
apiRouter.get("/getGuild.php", getGuildController);
|
||||
apiRouter.get("/setSupportedSyndicate.php", setSupportedSyndicateController);
|
||||
apiRouter.get("/getDailyDealStockLevels.php", getDailyDealStockLevelsController);
|
||||
apiRouter.get("/getGuildLog.php", getGuildLogController);
|
||||
apiRouter.get("/dojo", dojoController);
|
||||
apiRouter.get("/getGuildDojo.php", getGuildDojoController);
|
||||
|
||||
// post
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
@ -106,5 +114,7 @@ apiRouter.post("/addFriendImage.php", addFriendImageController);
|
||||
apiRouter.post("/createGuild.php", createGuildController);
|
||||
apiRouter.post("/sell.php", sellController);
|
||||
apiRouter.post("/upgrades.php", upgradesController);
|
||||
apiRouter.post("/guildTech.php", guildTechController);
|
||||
apiRouter.post("/createGuildDojo.php", createGuildDojoController);
|
||||
|
||||
export { apiRouter };
|
||||
|
Loading…
x
Reference in New Issue
Block a user