feat: implement pledging to syndicate (#162)
This commit is contained in:
parent
36ebc52696
commit
fd56203f35
9
src/controllers/api/setSupportedSyndicateController.ts
Normal file
9
src/controllers/api/setSupportedSyndicateController.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { RequestHandler } from "express";
|
||||
import { getInventory } from "@/src/services/inventoryService";
|
||||
|
||||
export const setSupportedSyndicateController: RequestHandler = async (req, res) => {
|
||||
const inventory = await getInventory(req.query.accountId as string);
|
||||
inventory.SupportedSyndicate = req.query.syndicate as string;
|
||||
await inventory.save();
|
||||
res.end();
|
||||
};
|
@ -645,6 +645,8 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
||||
//Curent trade info Giving or Getting items
|
||||
PendingTrades: [Schema.Types.Mixed],
|
||||
|
||||
//Syndicate currently being pledged to.
|
||||
SupportedSyndicate: String,
|
||||
//Curent Syndicates rank\exp
|
||||
Affiliations: [affiliationsSchema],
|
||||
//Syndicates Missions complate(Navigation->Syndicate)
|
||||
|
@ -46,6 +46,7 @@ import { addFriendImageController } from "@/src/controllers/api/addFriendImageCo
|
||||
import { createGuildController } from "@/src/controllers/api/createGuildController";
|
||||
import { sellController } from "@/src/controllers/api/sellController";
|
||||
import { upgradesController } from "@/src/controllers/api/upgradesController";
|
||||
import { setSupportedSyndicateController } from "@/src/controllers/api/setSupportedSyndicateController";
|
||||
|
||||
const apiRouter = express.Router();
|
||||
|
||||
@ -73,6 +74,7 @@ apiRouter.get("/logout.php", logoutController);
|
||||
apiRouter.get("/setBootLocation.php", setBootLocationController);
|
||||
apiRouter.get("/setActiveShip.php", setActiveShipController);
|
||||
apiRouter.get("/getGuild.php", getGuildController);
|
||||
apiRouter.get("/setSupportedSyndicate.php", setSupportedSyndicateController);
|
||||
|
||||
// post
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
|
@ -190,6 +190,7 @@ export interface IInventoryResponse {
|
||||
Boosters: IBooster[];
|
||||
ActiveDojoColorResearch: string;
|
||||
SentientSpawnChanceBoosters: ISentientSpawnChanceBoosters;
|
||||
SupportedSyndicate?: string;
|
||||
Affiliations: IAffiliation[];
|
||||
QualifyingInvasions: any[];
|
||||
FactionScores: number[];
|
||||
|
Loading…
x
Reference in New Issue
Block a user