Inventory Infrastructure and Example for Suits #10
@ -11,6 +11,7 @@
|
|||||||
"node": true
|
"node": true
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"@typescript-eslint/no-misused-promises": "off",
|
||||||
"prettier/prettier": "error",
|
"prettier/prettier": "error",
|
||||||
"@typescript-eslint/semi": ["error"],
|
"@typescript-eslint/semi": ["error"],
|
||||||
"@typescript-eslint/explicit-function-return-type": "off",
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
11
.prettierrc
@ -14,5 +14,14 @@
|
|||||||
"singleQuote": false,
|
"singleQuote": false,
|
||||||
"vueIndentScriptAndStyle": true,
|
"vueIndentScriptAndStyle": true,
|
||||||
"arrowParens": "avoid",
|
"arrowParens": "avoid",
|
||||||
"bracketSpacing": true
|
"bracketSpacing": true,
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": "*.json",
|
||||||
|
"options": {
|
||||||
|
"tabWidth": 2,
|
||||||
|
"printWidth": 200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
6451
package-lock.json
generated
14
package.json
@ -7,28 +7,28 @@
|
|||||||
"start": "node build/index.js",
|
"start": "node build/index.js",
|
||||||
"dev": "ts-node-dev --openssl-legacy-provider -r tsconfig-paths/register src/index.ts",
|
"dev": "ts-node-dev --openssl-legacy-provider -r tsconfig-paths/register src/index.ts",
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"lint": "eslint --ext .ts ."
|
"lint": "eslint --ext .ts .",
|
||||||
|
"prettier": "prettier --write ."
|
||||||
},
|
},
|
||||||
"license": "GNU",
|
"license": "GNU",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dotenv": "^16.0.3",
|
"dotenv": "^16.1.3",
|
||||||
"express": "^5.0.0-beta.1",
|
"express": "^5.0.0-beta.1",
|
||||||
"mongoose": "^7.1.1"
|
"mongoose": "^7.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tsconfig/node20": "^1.0.0",
|
"@tsconfig/node20": "^1.0.0",
|
||||||
"@types/body-parser": "^1.19.2",
|
|
||||||
"@types/express": "^4.17.17",
|
"@types/express": "^4.17.17",
|
||||||
"@types/morgan": "^1.9.4",
|
"@types/morgan": "^1.9.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
"@typescript-eslint/eslint-plugin": "^5.59.8",
|
||||||
"@typescript-eslint/parser": "^5.59.2",
|
"@typescript-eslint/parser": "^5.59.8",
|
||||||
"eslint": "^8.40.0",
|
"eslint": "^8.41.0",
|
||||||
"eslint-plugin-prettier": "^4.2.1",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"morgan": "^1.10.0",
|
"morgan": "^1.10.0",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"ts-node-dev": "^2.0.0",
|
"ts-node-dev": "^2.0.0",
|
||||||
"tsconfig-paths": "^4.2.0",
|
"tsconfig-paths": "^4.2.0",
|
||||||
"typescript": "^5.0.4"
|
"typescript": "^5.1.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.15.0",
|
"node": ">=18.15.0",
|
||||||
|
11
src/app.ts
@ -6,14 +6,14 @@ import { requestLogger, unknownEndpointHandler } from "@/src/middleware/middlewa
|
|||||||
import { apiRouter } from "@/src/routes/api";
|
import { apiRouter } from "@/src/routes/api";
|
||||||
//import { testRouter } from "@/src/routes/test";
|
//import { testRouter } from "@/src/routes/test";
|
||||||
import { cacheRouter } from "@/src/routes/cache";
|
import { cacheRouter } from "@/src/routes/cache";
|
||||||
import { customRouter } from "./routes/custom";
|
|
||||||
import { dynamicController } from "./routes/dynamic";
|
|
||||||
|
|
||||||
import bodyParser from "body-parser";
|
import bodyParser from "body-parser";
|
||||||
|
|
||||||
import morgan from "morgan";
|
import morgan from "morgan";
|
||||||
import { steamPacksController } from "./controllers/misc/steamPacksController";
|
import { steamPacksController } from "@/src/controllers/misc/steamPacksController";
|
||||||
import { connectDatabase } from "./services/mongoService";
|
import { customRouter } from "@/src/routes/custom";
|
||||||
|
import { dynamicController } from "@/src/routes/dynamic";
|
||||||
|
import { statsRouter } from "@/src/routes/stats";
|
||||||
|
import { connectDatabase } from "@/src/services/mongoService";
|
||||||
|
|
||||||
void connectDatabase();
|
void connectDatabase();
|
||||||
|
|
||||||
@ -32,6 +32,7 @@ app.use("/custom", customRouter);
|
|||||||
app.use("/:id/dynamic", dynamicController);
|
app.use("/:id/dynamic", dynamicController);
|
||||||
|
|
||||||
app.post("/pay/steamPacks.php", steamPacksController);
|
app.post("/pay/steamPacks.php", steamPacksController);
|
||||||
|
app.use("/stats", statsRouter);
|
||||||
|
|
||||||
app.use(unknownEndpointHandler);
|
app.use(unknownEndpointHandler);
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
|
|
||||||
const deleteSessionController: RequestHandler = (_req, res) => {
|
const deleteSessionController: RequestHandler = (_req, res) => {
|
||||||
console.log("DeleteSession Request:", JSON.parse(_req.body));
|
|
||||||
res.json({ sessionId: { $oid: "64768f104722f795300c9fc0" }, rewardSeed: 5867309943877621023 });
|
res.json({ sessionId: { $oid: "64768f104722f795300c9fc0" }, rewardSeed: 5867309943877621023 });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
|
|
||||||
const genericUpdateController: RequestHandler = (_req, res) => {
|
const genericUpdateController: RequestHandler = (_req, res) => {
|
||||||
console.log("GenericUpdate Request:", JSON.parse(_req.body));
|
|
||||||
res.json({});
|
res.json({});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
|
|
||||||
const getCreditsController: RequestHandler = (_req, res) => {
|
const getCreditsController: RequestHandler = (_req, res) => {
|
||||||
res.json({ "RegularCredits": 42069, "TradesRemaining": 1, "PremiumCreditsFree": 42069, "PremiumCredits": 42069 });
|
res.json({ RegularCredits: 42069, TradesRemaining: 1, PremiumCreditsFree: 42069, PremiumCredits: 42069 });
|
||||||
};
|
};
|
||||||
|
|
||||||
export { getCreditsController };
|
export { getCreditsController };
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Request, Response } from "express";
|
import { Request, Response } from "express";
|
||||||
|
|
||||||
export default (_request: Request, response: Response) => {
|
const getFriendsController = (_request: Request, response: Response) => {
|
||||||
response.writeHead(200, {
|
response.writeHead(200, {
|
||||||
//Connection: "keep-alive",
|
//Connection: "keep-alive",
|
||||||
//"Content-Encoding": "gzip",
|
//"Content-Encoding": "gzip",
|
||||||
@ -10,3 +10,5 @@ export default (_request: Request, response: Response) => {
|
|||||||
});
|
});
|
||||||
response.end(Buffer.from([0x7b, 0x7d, 0x0a]));
|
response.end(Buffer.from([0x7b, 0x7d, 0x0a]));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export { getFriendsController };
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
|
|||||||
import inventory from "@/static/fixed_responses/inventory.json";
|
import inventory from "@/static/fixed_responses/inventory.json";
|
||||||
import { Request, RequestHandler, Response } from "express";
|
import { Request, RequestHandler, Response } from "express";
|
||||||
![]() isnt disabled globally now? isnt disabled globally now?
![]() no idea it shouldn't be no idea it shouldn't be
![]() then remove the one from .eslintrc then remove the one from .eslintrc
![]() I agree with you that it is stupid to have the line in every file that has an async handler. But I don't like to globally disable a warning. Ill turn the .eslintrc back on I agree with you that it is stupid to have the line in every file that has an async handler.
But I don't like to globally disable a warning. Ill turn the .eslintrc back on
|
|||||||
|
|
||||||
const inventorController: RequestHandler = (request: Request, response: Response) => {
|
const inventoryController: RequestHandler = (request: Request, response: Response) => {
|
||||||
![]() i dont think the comment is necessary
i dont think the comment is necessary
```suggestion
const inventory = await Inventory.findOne({ accountOwnerId: accountId });
```
![]() check if inventory is undefined before trying check if inventory is undefined before trying `toJson()`
![]() it is important, because it is not present in the original response. it is important, because it is not present in the original response.
![]() ?. checks for undefined! ?. checks for undefined!
![]() this comment doesn't explain nothing, it says its using accountOwnerId to find an inventory which is obvious. this comment doesn't explain nothing, it says its using accountOwnerId to find an inventory which is obvious.
![]() that's why you check before so you dont two undefined checks that's why you check before so you dont two undefined checks
![]() it explains a lot. I added the field accountOwnerId and everyone who knows the inventory structure would know the field is not originally there. The purpose of the field is explained: it exists to find an account's corresponding inventory. it explains a lot.
I added the field accountOwnerId and everyone who knows the inventory structure would know the field is not originally there.
The purpose of the field is explained: it exists to find an account's corresponding inventory.
![]() good suggestion! good suggestion!
![]() I understand now what you mean I understand now what you mean
![]() should that belong then inside inventoryModel.ts? should that belong then inside inventoryModel.ts?
![]() i dont think the comment is necessary
i dont think the comment is necessary
```suggestion
const inventory = await Inventory.findOne({ accountOwnerId: accountId });
```
![]() check if inventory is undefined before trying check if inventory is undefined before trying `toJson()`
![]() it is important, because it is not present in the original response. it is important, because it is not present in the original response.
![]() ?. checks for undefined! ?. checks for undefined!
![]() this comment doesn't explain nothing, it says its using accountOwnerId to find an inventory which is obvious. this comment doesn't explain nothing, it says its using accountOwnerId to find an inventory which is obvious.
![]() that's why you check before so you dont two undefined checks that's why you check before so you dont two undefined checks
![]() it explains a lot. I added the field accountOwnerId and everyone who knows the inventory structure would know the field is not originally there. The purpose of the field is explained: it exists to find an account's corresponding inventory. it explains a lot.
I added the field accountOwnerId and everyone who knows the inventory structure would know the field is not originally there.
The purpose of the field is explained: it exists to find an account's corresponding inventory.
![]() good suggestion! good suggestion!
![]() I understand now what you mean I understand now what you mean
![]() should that belong then inside inventoryModel.ts? should that belong then inside inventoryModel.ts?
|
|||||||
console.log(request.query);
|
console.log(request.query);
|
||||||
const accountId = request.query.accountId;
|
const accountId = request.query.accountId;
|
||||||
console.log(accountId);
|
console.log(accountId);
|
||||||
response.json(inventory);
|
response.json(inventory);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default inventorController;
|
export { inventoryController };
|
||||||
![]() i dont think the comment is necessary
i dont think the comment is necessary
```suggestion
const inventory = await Inventory.findOne({ accountOwnerId: accountId });
```
![]() check if inventory is undefined before trying check if inventory is undefined before trying `toJson()`
![]() it is important, because it is not present in the original response. it is important, because it is not present in the original response.
![]() ?. checks for undefined! ?. checks for undefined!
![]() this comment doesn't explain nothing, it says its using accountOwnerId to find an inventory which is obvious. this comment doesn't explain nothing, it says its using accountOwnerId to find an inventory which is obvious.
![]() that's why you check before so you dont two undefined checks that's why you check before so you dont two undefined checks
![]() it explains a lot. I added the field accountOwnerId and everyone who knows the inventory structure would know the field is not originally there. The purpose of the field is explained: it exists to find an account's corresponding inventory. it explains a lot.
I added the field accountOwnerId and everyone who knows the inventory structure would know the field is not originally there.
The purpose of the field is explained: it exists to find an account's corresponding inventory.
![]() good suggestion! good suggestion!
![]() I understand now what you mean I understand now what you mean
![]() should that belong then inside inventoryModel.ts? should that belong then inside inventoryModel.ts?
![]() i dont think the comment is necessary
i dont think the comment is necessary
```suggestion
const inventory = await Inventory.findOne({ accountOwnerId: accountId });
```
![]() check if inventory is undefined before trying check if inventory is undefined before trying `toJson()`
![]() it is important, because it is not present in the original response. it is important, because it is not present in the original response.
![]() ?. checks for undefined! ?. checks for undefined!
![]() this comment doesn't explain nothing, it says its using accountOwnerId to find an inventory which is obvious. this comment doesn't explain nothing, it says its using accountOwnerId to find an inventory which is obvious.
![]() that's why you check before so you dont two undefined checks that's why you check before so you dont two undefined checks
![]() it explains a lot. I added the field accountOwnerId and everyone who knows the inventory structure would know the field is not originally there. The purpose of the field is explained: it exists to find an account's corresponding inventory. it explains a lot.
I added the field accountOwnerId and everyone who knows the inventory structure would know the field is not originally there.
The purpose of the field is explained: it exists to find an account's corresponding inventory.
![]() good suggestion! good suggestion!
![]() I understand now what you mean I understand now what you mean
![]() should that belong then inside inventoryModel.ts? should that belong then inside inventoryModel.ts?
|
|||||||
|
|||||||
![]() i dont think the comment is necessary
i dont think the comment is necessary
```suggestion
const inventory = await Inventory.findOne({ accountOwnerId: accountId });
```
![]() i dont think the comment is necessary
i dont think the comment is necessary
```suggestion
const inventory = await Inventory.findOne({ accountOwnerId: accountId });
```
![]() check if inventory is undefined before trying check if inventory is undefined before trying `toJson()`
![]() check if inventory is undefined before trying check if inventory is undefined before trying `toJson()`
![]() it is important, because it is not present in the original response. it is important, because it is not present in the original response.
![]() it is important, because it is not present in the original response. it is important, because it is not present in the original response.
![]() ?. checks for undefined! ?. checks for undefined!
![]() ?. checks for undefined! ?. checks for undefined!
![]() this comment doesn't explain nothing, it says its using accountOwnerId to find an inventory which is obvious. this comment doesn't explain nothing, it says its using accountOwnerId to find an inventory which is obvious.
![]() this comment doesn't explain nothing, it says its using accountOwnerId to find an inventory which is obvious. this comment doesn't explain nothing, it says its using accountOwnerId to find an inventory which is obvious.
![]() that's why you check before so you dont two undefined checks that's why you check before so you dont two undefined checks
![]() that's why you check before so you dont two undefined checks that's why you check before so you dont two undefined checks
![]() it explains a lot. I added the field accountOwnerId and everyone who knows the inventory structure would know the field is not originally there. The purpose of the field is explained: it exists to find an account's corresponding inventory. it explains a lot.
I added the field accountOwnerId and everyone who knows the inventory structure would know the field is not originally there.
The purpose of the field is explained: it exists to find an account's corresponding inventory.
![]() it explains a lot. I added the field accountOwnerId and everyone who knows the inventory structure would know the field is not originally there. The purpose of the field is explained: it exists to find an account's corresponding inventory. it explains a lot.
I added the field accountOwnerId and everyone who knows the inventory structure would know the field is not originally there.
The purpose of the field is explained: it exists to find an account's corresponding inventory.
![]() good suggestion! good suggestion!
![]() good suggestion! good suggestion!
![]() I understand now what you mean I understand now what you mean
![]() I understand now what you mean I understand now what you mean
![]() should that belong then inside inventoryModel.ts? should that belong then inside inventoryModel.ts?
![]() should that belong then inside inventoryModel.ts? should that belong then inside inventoryModel.ts?
|
@ -9,7 +9,6 @@ import { createAccount, isCorrectPassword } from "@/src/services/loginService";
|
|||||||
import { ILoginResponse } from "@/src/types/loginTypes";
|
import { ILoginResponse } from "@/src/types/loginTypes";
|
||||||
import { DTLS, groups, HUB, IRC, Nonce, NRS, platformCDNs } from "@/static/fixed_responses/login_static";
|
import { DTLS, groups, HUB, IRC, Nonce, NRS, platformCDNs } from "@/static/fixed_responses/login_static";
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
||||||
const loginController: RequestHandler = async (request, response) => {
|
const loginController: RequestHandler = async (request, response) => {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument
|
||||||
const body = JSON.parse(request.body); // parse octet stream of json data to json object
|
const body = JSON.parse(request.body); // parse octet stream of json data to json object
|
||||||
@ -34,7 +33,6 @@ const loginController: RequestHandler = async (request, response) => {
|
|||||||
TrackedSettings: []
|
TrackedSettings: []
|
||||||
});
|
});
|
||||||
console.log("CREATED ACCOUNT", newAccount);
|
console.log("CREATED ACCOUNT", newAccount);
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
const { email, password, ...databaseAccount } = newAccount;
|
const { email, password, ...databaseAccount } = newAccount;
|
||||||
const newLoginResponse: ILoginResponse = {
|
const newLoginResponse: ILoginResponse = {
|
||||||
...databaseAccount,
|
...databaseAccount,
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
|
|
||||||
const logoutController: RequestHandler = (_req, res) => {
|
const logoutController: RequestHandler = (_req, res) => {
|
||||||
const data = Buffer.from([
|
const data = Buffer.from([0x31]);
|
||||||
0x31
|
|
||||||
]);
|
|
||||||
res.writeHead(200, {
|
res.writeHead(200, {
|
||||||
"Content-Type": "text/html",
|
"Content-Type": "text/html",
|
||||||
"Content-Length": data.length
|
"Content-Length": data.length
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
|
import modularWeaponSale from "@/static/fixed_responses/modularWeaponSale.json";
|
||||||
|
|
||||||
const modularWeaponSaleController: RequestHandler = (_req, res) => {
|
const modularWeaponSaleController: RequestHandler = (_req, res) => {
|
||||||
res.json({"SaleInfos":[{"Name":"Ostron","Expiry":{"$date":{"$numberLong":"1683586800000"}},"Revision":3045,"Weapons":[{"ItemType":"/Lotus/Weapons/Ostron/Melee/LotusModularWeapon","PremiumPrice":171,"ModularParts":["/Lotus/Weapons/Ostron/Melee/ModularMelee01/Handle/HandleFive","/Lotus/Weapons/Ostron/Melee/ModularMelee01/Tip/TipSix","/Lotus/Weapons/Ostron/Melee/ModularMelee01/Balance/BalanceDamageICritII"]}]},{"Name":"SolarisUnitedHoverboard","Expiry":{"$date":{"$numberLong":"1683586800000"}},"Revision":1650,"Weapons":[{"ItemType":"/Lotus/Types/Vehicles/Hoverboard/HoverboardSuit","PremiumPrice":51,"ModularParts":["/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardCorpusC/HoverboardCorpusCDeck","/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardCorpusC/HoverboardCorpusCEngine","/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardCorpusB/HoverboardCorpusBFront","/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardCorpusC/HoverboardCorpusCJet"]}]},{"Name":"SolarisUnitedMoaPet","Expiry":{"$date":{"$numberLong":"1683586800000"}},"Revision":1650,"Weapons":[{"ItemType":"/Lotus/Types/Friendly/Pets/MoaPets/MoaPetPowerSuit","PremiumPrice":175,"ModularParts":["/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetLegC","/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetHeadOloro","/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetEngineKrisys","/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetPayloadThermocor"]}]},{"Name":"SolarisUnitedKitGun","Expiry":{"$date":{"$numberLong":"1683586800000"}},"Revision":1650,"Weapons":[{"ItemType":"/Lotus/Weapons/SolarisUnited/Primary/LotusModularPrimaryBeam","PremiumPrice":157,"ModularParts":["/Lotus/Weapons/SolarisUnited/Primary/SUModularPrimarySet1/Handles/SUModularPrimaryHandleAPart","/Lotus/Weapons/SolarisUnited/Secondary/SUModularSecondarySet1/Barrel/SUModularSecondaryBarrelDPart","/Lotus/Weapons/SolarisUnited/Secondary/SUModularSecondarySet1/Clip/SUModularCritIReloadIIClipPart"]}]}]});
|
res.json(modularWeaponSale);
|
||||||
};
|
};
|
||||||
|
|
||||||
export { modularWeaponSaleController };
|
export { modularWeaponSaleController };
|
@ -1,6 +1,8 @@
|
|||||||
import purchase from "@/static/fixed_responses/purchase.json";
|
import purchase from "@/static/fixed_responses/purchase.json";
|
||||||
import { Request, Response } from "express";
|
import { Request, Response } from "express";
|
||||||
|
|
||||||
export default (_req: Request, res: Response): void => {
|
const purchaseController = (_req: Request, res: Response): void => {
|
||||||
res.json(purchase);
|
res.json(purchase);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export { purchaseController };
|
||||||
|
8
src/controllers/api/rerollRandomModController.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { RequestHandler } from "express";
|
||||||
|
|
||||||
|
const rerollRandomModController: RequestHandler = (_req, res) => {
|
||||||
|
console.log("RerollRandomMod Request:", _req.body.toString("hex").replace(/(.)(.)/g, "$1$2 "));
|
||||||
|
res.json({});
|
||||||
|
};
|
||||||
|
|
||||||
|
export { rerollRandomModController };
|
@ -6,6 +6,6 @@ const updateSessionGetController: RequestHandler = (_req, res) => {
|
|||||||
const updateSessionPostController: RequestHandler = (_req, res) => {
|
const updateSessionPostController: RequestHandler = (_req, res) => {
|
||||||
console.log("UpdateSessions POST Request:", JSON.parse(_req.body));
|
console.log("UpdateSessions POST Request:", JSON.parse(_req.body));
|
||||||
|
|
||||||
res.json({ "hasStarted": true });
|
res.json({ hasStarted: true });
|
||||||
};
|
};
|
||||||
export { updateSessionGetController, updateSessionPostController };
|
export { updateSessionGetController, updateSessionPostController };
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
||||||
import { toCreateAccount, toDatabaseAccount } from "@/src/helpers/customHelpers";
|
import { toCreateAccount, toDatabaseAccount } from "@/src/helpers/customHelpers";
|
||||||
import { createAccount } from "@/src/services/loginService";
|
import { createAccount } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
|
7
src/controllers/stats/uploadController.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { RequestHandler } from "express";
|
||||||
|
|
||||||
|
const uploadController: RequestHandler = (_req, res) => {
|
||||||
|
res.json({});
|
||||||
|
};
|
||||||
|
|
||||||
|
export { uploadController };
|
@ -1,6 +1,6 @@
|
|||||||
|
import { IAccountCreation } from "@/src/types/customTypes";
|
||||||
|
import { IDatabaseAccount } from "@/src/types/loginTypes";
|
||||||
import crypto from "crypto";
|
import crypto from "crypto";
|
||||||
import { IAccountCreation } from "../types/customTypes";
|
|
||||||
import { IDatabaseAccount } from "../types/loginTypes";
|
|
||||||
import { isString, parseEmail, parseString } from "./general";
|
import { isString, parseEmail, parseString } from "./general";
|
||||||
|
|
||||||
const getWhirlpoolHash = (rawPassword: string): string => {
|
const getWhirlpoolHash = (rawPassword: string): string => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ILoginRequest } from "../types/loginTypes";
|
import { ILoginRequest } from "@/src/types/loginTypes";
|
||||||
import { parseEmail, parseNumber, parseString } from "./general";
|
import { parseEmail, parseNumber, parseString } from "./general";
|
||||||
|
|
||||||
const toLoginRequest = (loginRequest: unknown): ILoginRequest => {
|
const toLoginRequest = (loginRequest: unknown): ILoginRequest => {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
import { IDatabaseAccountDocument } from "@/src/types/loginTypes";
|
||||||
import { model, Schema, SchemaOptions } from "mongoose";
|
import { model, Schema, SchemaOptions } from "mongoose";
|
||||||
import { IDatabaseAccountDocument } from "../types/loginTypes";
|
|
||||||
|
|
||||||
const opts = {
|
const opts = {
|
||||||
toJSON: { virtuals: true },
|
toJSON: { virtuals: true },
|
||||||
|
@ -1,34 +1,33 @@
|
|||||||
import getFriendsController from "@/src/controllers/api/getFriendsController";
|
import { checkDailyMissionBonusController } from "@/src/controllers/api/checkDailyMissionBonusController";
|
||||||
import inventoryController from "@/src/controllers/api/inventoryController";
|
import { deleteSessionController } from "@/src/controllers/api/deleteSessionController";
|
||||||
import purchaseController from "@/src/controllers/api/purchaseController";
|
import { dronesController } from "@/src/controllers/api/dronesController";
|
||||||
|
import { findSessionsController } from "@/src/controllers/api/findSessionsController";
|
||||||
|
import { genericUpdateController } from "@/src/controllers/api/genericUpdateController";
|
||||||
|
import { getAllianceController } from "@/src/controllers/api/getAllianceController";
|
||||||
|
import { getCreditsController } from "@/src/controllers/api/getCreditsController";
|
||||||
|
import { getFriendsController } from "@/src/controllers/api/getFriendsController";
|
||||||
|
import { getIgnoredUsersController } from "@/src/controllers/api/getIgnoredUsersController";
|
||||||
|
import { getNewRewardSeedController } from "@/src/controllers/api/getNewRewardSeedController";
|
||||||
|
import { getShipController } from "@/src/controllers/api/getShipController";
|
||||||
|
import { hostSessionController } from "@/src/controllers/api/hostSessionController";
|
||||||
|
import { hubController } from "@/src/controllers/api/hubController";
|
||||||
|
import { hubInstancesController } from "@/src/controllers/api/hubInstancesController";
|
||||||
|
import { inboxController } from "@/src/controllers/api/inboxController";
|
||||||
|
import { inventoryController } from "@/src/controllers/api/inventoryController";
|
||||||
|
import { loginController } from "@/src/controllers/api/loginController";
|
||||||
|
import { loginRewardsController } from "@/src/controllers/api/loginRewardsController";
|
||||||
|
import { logoutController } from "@/src/controllers/api/logoutController";
|
||||||
|
import { marketRecommendationsController } from "@/src/controllers/api/marketRecommendationsController";
|
||||||
|
import { missionInventoryUpdateController } from "@/src/controllers/api/missionInventoryUpdateController";
|
||||||
|
import { modularWeaponSaleController } from "@/src/controllers/api/modularWeaponSaleController";
|
||||||
|
import { purchaseController } from "@/src/controllers/api/purchaseController";
|
||||||
|
import { rerollRandomModController } from "@/src/controllers/api/rerollRandomModController";
|
||||||
|
import { setActiveQuestController } from "@/src/controllers/api/setActiveQuestController";
|
||||||
|
import { surveysController } from "@/src/controllers/api/surveysController";
|
||||||
|
import { updateChallengeProgressController } from "@/src/controllers/api/updateChallengeProgressController";
|
||||||
|
import { updateSessionGetController, updateSessionPostController } from "@/src/controllers/api/updateSessionController";
|
||||||
|
import { viewController } from "@/src/controllers/api/viewController";
|
||||||
import express from "express";
|
import express from "express";
|
||||||
import { checkDailyMissionBonusController } from "../controllers/api/checkDailyMissionBonusController";
|
|
||||||
import { dronesController } from "../controllers/api/dronesController";
|
|
||||||
import { findSessionsController } from "../controllers/api/findSessionsController";
|
|
||||||
import { getAllianceController } from "../controllers/api/getAllianceController";
|
|
||||||
import { getIgnoredUsersController } from "../controllers/api/getIgnoredUsersController";
|
|
||||||
import { getNewRewardSeedController } from "../controllers/api/getNewRewardSeedController";
|
|
||||||
import { getShipController } from "../controllers/api/getShipController";
|
|
||||||
import { hostSessionController } from "../controllers/api/hostSessionController";
|
|
||||||
import { inboxController } from "../controllers/api/inboxController";
|
|
||||||
import { loginController } from "../controllers/api/loginController";
|
|
||||||
import { loginRewardsController } from "../controllers/api/loginRewardsController";
|
|
||||||
import { marketRecommendationsController } from "../controllers/api/marketRecommendationsController";
|
|
||||||
import { setActiveQuestController } from "../controllers/api/setActiveQuestController";
|
|
||||||
import { surveysController } from "../controllers/api/surveysController";
|
|
||||||
import { updateChallengeProgressController } from "../controllers/api/updateChallengeProgressController";
|
|
||||||
import { viewController } from "../controllers/api/viewController";
|
|
||||||
import { updateSessionPostController } from "../controllers/api/updateSessionController";
|
|
||||||
import { updateSessionGetController } from "../controllers/api/updateSessionController";
|
|
||||||
import { getCreditsController } from "../controllers/api/getCreditsController";
|
|
||||||
import { hubInstancesController } from "../controllers/api/hubInstancesController";
|
|
||||||
import { hubController } from "../controllers/api/hubController";
|
|
||||||
import { modularWeaponSaleController } from "../controllers/api/modularWeaponSaleController";
|
|
||||||
import { deleteSessionController } from "../controllers/api/deleteSessionController";
|
|
||||||
import { logoutController } from "../controllers/api/logoutController";
|
|
||||||
import { missionInventoryUpdateController } from "../controllers/api/missionInventoryUpdateController";
|
|
||||||
import { genericUpdateController } from "../controllers/api/genericUpdateController";
|
|
||||||
|
|
||||||
|
|
||||||
const apiRouter = express.Router();
|
const apiRouter = express.Router();
|
||||||
|
|
||||||
@ -65,5 +64,5 @@ apiRouter.post("/hostSession.php", hostSessionController);
|
|||||||
apiRouter.post("/updateSession.php", updateSessionPostController);
|
apiRouter.post("/updateSession.php", updateSessionPostController);
|
||||||
apiRouter.post("/missionInventoryUpdate.php", missionInventoryUpdateController);
|
apiRouter.post("/missionInventoryUpdate.php", missionInventoryUpdateController);
|
||||||
apiRouter.post("/genericUpdate.php", genericUpdateController);
|
apiRouter.post("/genericUpdate.php", genericUpdateController);
|
||||||
|
apiRouter.post("/rerollRandomMod.php", rerollRandomModController);
|
||||||
export { apiRouter };
|
export { apiRouter };
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
import { createAccountController } from "@/src/controllers/custom/createAccountController";
|
||||||
import express from "express";
|
import express from "express";
|
||||||
import { createAccountController } from "../controllers/custom/createAccountController";
|
|
||||||
|
|
||||||
const customRouter = express.Router();
|
const customRouter = express.Router();
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
import { aggregateSessionsController } from "@/src/controllers/dynamic/aggregateSessionsController";
|
||||||
|
import { worldStateController } from "@/src/controllers/dynamic/worldStateController";
|
||||||
import express from "express";
|
import express from "express";
|
||||||
import { aggregateSessionsController } from "../controllers/dynamic/aggregateSessionsController";
|
|
||||||
import { worldStateController } from "../controllers/dynamic/worldStateController";
|
|
||||||
|
|
||||||
const dynamicController = express.Router();
|
const dynamicController = express.Router();
|
||||||
|
|
||||||
|
7
src/routes/stats.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { uploadController } from "@/src/controllers/stats/uploadController";
|
||||||
|
import express from "express";
|
||||||
|
|
||||||
|
const statsRouter = express.Router();
|
||||||
|
|
||||||
|
statsRouter.post("/upload.php", uploadController);
|
||||||
|
export { statsRouter };
|
@ -1,5 +1,5 @@
|
|||||||
import { Account } from "../models/loginModel";
|
import { Account } from "@/src/models/loginModel";
|
||||||
import { IDatabaseAccount } from "../types/loginTypes";
|
import { IDatabaseAccount } from "@/src/types/loginTypes";
|
||||||
|
|
||||||
const isCorrectPassword = (requestPassword: string, databasePassword: string): boolean => {
|
const isCorrectPassword = (requestPassword: string, databasePassword: string): boolean => {
|
||||||
return requestPassword === databasePassword;
|
return requestPassword === databasePassword;
|
||||||
|
106
static/fixed_responses/aggregateSessions.json
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
{
|
||||||
|
"Results": [
|
||||||
|
{ "gameModeId": 3228, "count": 12 },
|
||||||
|
{ "gameModeId": 2022236, "count": 1 },
|
||||||
|
{ "gameModeId": 1109004, "count": 1 },
|
||||||
|
{ "gameModeId": 2004450, "count": 1 },
|
||||||
|
{ "gameModeId": 2129, "count": 4 },
|
||||||
|
{ "gameModeId": 8763, "count": 1 },
|
||||||
|
{ "gameModeId": 12183, "count": 1 },
|
||||||
|
{ "gameModeId": 11167, "count": 1 },
|
||||||
|
{ "gameModeId": 17710, "count": 1 },
|
||||||
|
{ "gameModeId": 22237, "count": 1 },
|
||||||
|
{ "gameModeId": 3509, "count": 1 },
|
||||||
|
{ "gameModeId": 13006, "count": 1 },
|
||||||
|
{ "gameModeId": 20801, "count": 2 },
|
||||||
|
{ "gameModeId": 204014, "count": 1 },
|
||||||
|
{ "gameModeId": 2061, "count": 1 },
|
||||||
|
{ "gameModeId": 303025, "count": 1 },
|
||||||
|
{ "gameModeId": 702001, "count": 12 },
|
||||||
|
{ "gameModeId": 2305121, "count": 1 },
|
||||||
|
{ "gameModeId": 1704046, "count": 1 },
|
||||||
|
{ "gameModeId": 17229, "count": 12 },
|
||||||
|
{ "gameModeId": 717000, "count": 15 },
|
||||||
|
{ "gameModeId": 9536, "count": 1 },
|
||||||
|
{ "gameModeId": 15409, "count": 1 },
|
||||||
|
{ "gameModeId": 722000, "count": 20 },
|
||||||
|
{ "gameModeId": 22232, "count": 2 },
|
||||||
|
{ "gameModeId": 2023, "count": 2 },
|
||||||
|
{ "gameModeId": 1704008, "count": 1 },
|
||||||
|
{ "gameModeId": 6042, "count": 1 },
|
||||||
|
{ "gameModeId": 2305053, "count": 1 },
|
||||||
|
{ "gameModeId": 2022238, "count": 2 },
|
||||||
|
{ "gameModeId": 1708001, "count": 1 },
|
||||||
|
{ "gameModeId": 5004, "count": 1 },
|
||||||
|
{ "gameModeId": 605088, "count": 1 },
|
||||||
|
{ "gameModeId": 6032, "count": 1 },
|
||||||
|
{ "gameModeId": 2022, "count": 2 },
|
||||||
|
{ "gameModeId": 1216214, "count": 1 },
|
||||||
|
{ "gameModeId": 3903, "count": 1 },
|
||||||
|
{ "gameModeId": 6096, "count": 1 },
|
||||||
|
{ "gameModeId": 2003079, "count": 1 },
|
||||||
|
{ "gameModeId": 1105121, "count": 1 },
|
||||||
|
{ "gameModeId": 616020, "count": 1 },
|
||||||
|
{ "gameModeId": 1204235, "count": 1 },
|
||||||
|
{ "gameModeId": 9024, "count": 2 },
|
||||||
|
{ "gameModeId": 703004, "count": 16 },
|
||||||
|
{ "gameModeId": 706000, "count": 2 },
|
||||||
|
{ "gameModeId": 201223, "count": 1 },
|
||||||
|
{ "gameModeId": 1404068, "count": 2 },
|
||||||
|
{ "gameModeId": 22231, "count": 1 },
|
||||||
|
{ "gameModeId": 2111019, "count": 1 },
|
||||||
|
{ "gameModeId": 1407064, "count": 1 },
|
||||||
|
{ "gameModeId": 701000, "count": 2 },
|
||||||
|
{ "gameModeId": 703000, "count": 2 },
|
||||||
|
{ "gameModeId": 1703039, "count": 1 },
|
||||||
|
{ "gameModeId": 5005, "count": 1 },
|
||||||
|
{ "gameModeId": 2001094, "count": 1 },
|
||||||
|
{ "gameModeId": 22236, "count": 2 },
|
||||||
|
{ "gameModeId": 703003, "count": 1 },
|
||||||
|
{ "gameModeId": 98000, "count": 30 },
|
||||||
|
{ "gameModeId": 1419748, "count": 1 },
|
||||||
|
{ "gameModeId": 21555, "count": 1 },
|
||||||
|
{ "gameModeId": 22238, "count": 1 },
|
||||||
|
{ "gameModeId": 1704113, "count": 1 },
|
||||||
|
{ "gameModeId": 9025, "count": 2 },
|
||||||
|
{ "gameModeId": 1318307, "count": 1 },
|
||||||
|
{ "gameModeId": 303034, "count": 1 },
|
||||||
|
{ "gameModeId": 15401, "count": 1 },
|
||||||
|
{ "gameModeId": 4904, "count": 1 },
|
||||||
|
{ "gameModeId": 2305126, "count": 1 },
|
||||||
|
{ "gameModeId": 2002123, "count": 1 },
|
||||||
|
{ "gameModeId": 9004, "count": 1 },
|
||||||
|
{ "gameModeId": 1702109, "count": 1 },
|
||||||
|
{ "gameModeId": 15408, "count": 1 },
|
||||||
|
{ "gameModeId": 6013, "count": 1 },
|
||||||
|
{ "gameModeId": 17706, "count": 2 },
|
||||||
|
{ "gameModeId": 2005053, "count": 1 },
|
||||||
|
{ "gameModeId": 1805125, "count": 2 },
|
||||||
|
{ "gameModeId": 15402, "count": 1 },
|
||||||
|
{ "gameModeId": 101, "count": 3 },
|
||||||
|
{ "gameModeId": 2010144, "count": 1 },
|
||||||
|
{ "gameModeId": 3027, "count": 1 },
|
||||||
|
{ "gameModeId": 2001, "count": 1 },
|
||||||
|
{ "gameModeId": 12191, "count": 1 },
|
||||||
|
{ "gameModeId": 1112189, "count": 1 },
|
||||||
|
{ "gameModeId": 4450, "count": 1 },
|
||||||
|
{ "gameModeId": 2011019, "count": 1 },
|
||||||
|
{ "gameModeId": 12195, "count": 1 },
|
||||||
|
{ "gameModeId": 8525, "count": 1 },
|
||||||
|
{ "gameModeId": 12014, "count": 1 },
|
||||||
|
{ "gameModeId": 12189, "count": 1 },
|
||||||
|
{ "gameModeId": 10147, "count": 1 },
|
||||||
|
{ "gameModeId": 11175, "count": 1 },
|
||||||
|
{ "gameModeId": 1703089, "count": 1 },
|
||||||
|
{ "gameModeId": 2104, "count": 1 },
|
||||||
|
{ "gameModeId": 2015409, "count": 1 },
|
||||||
|
{ "gameModeId": 4058, "count": 1 },
|
||||||
|
{ "gameModeId": 1416015, "count": 2 },
|
||||||
|
{ "gameModeId": 1201108, "count": 1 },
|
||||||
|
{ "gameModeId": 704001, "count": 6 },
|
||||||
|
{ "gameModeId": 2022230, "count": 1 },
|
||||||
|
{ "gameModeId": 5100, "count": 1 },
|
||||||
|
{ "gameModeId": 1703026, "count": 1 },
|
||||||
|
{ "gameModeId": 1415400, "count": 1 }
|
||||||
|
]
|
||||||
|
}
|
@ -1,24 +1,24 @@
|
|||||||
{
|
{
|
||||||
"ShipOwnerId": "removed",
|
"ShipOwnerId": "removed",
|
||||||
"Ship": {
|
"Ship": {
|
||||||
"Rooms": [
|
"Rooms": [
|
||||||
{ "Name": "AlchemyRoom", "MaxCapacity": 1600 },
|
{ "Name": "AlchemyRoom", "MaxCapacity": 1600 },
|
||||||
{ "Name": "BridgeRoom", "MaxCapacity": 1600 },
|
{ "Name": "BridgeRoom", "MaxCapacity": 1600 },
|
||||||
{ "Name": "LisetRoom", "MaxCapacity": 1000 },
|
{ "Name": "LisetRoom", "MaxCapacity": 1000 },
|
||||||
{ "Name": "OperatorChamberRoom", "MaxCapacity": 1600 },
|
{ "Name": "OperatorChamberRoom", "MaxCapacity": 1600 },
|
||||||
{ "Name": "OutsideRoom", "MaxCapacity": 1600 },
|
{ "Name": "OutsideRoom", "MaxCapacity": 1600 },
|
||||||
{ "Name": "PersonalQuartersRoom", "MaxCapacity": 1600 }
|
{ "Name": "PersonalQuartersRoom", "MaxCapacity": 1600 }
|
||||||
],
|
],
|
||||||
"ContentUrlSignature": "removed"
|
"ContentUrlSignature": "removed"
|
||||||
},
|
},
|
||||||
"Apartment": {
|
"Apartment": {
|
||||||
"Rooms": [
|
"Rooms": [
|
||||||
{ "Name": "ElevatorLanding", "MaxCapacity": 1600 },
|
{ "Name": "ElevatorLanding", "MaxCapacity": 1600 },
|
||||||
{ "Name": "ApartmentRoomA", "MaxCapacity": 1000 },
|
{ "Name": "ApartmentRoomA", "MaxCapacity": 1000 },
|
||||||
{ "Name": "ApartmentRoomB", "MaxCapacity": 1600 },
|
{ "Name": "ApartmentRoomB", "MaxCapacity": 1600 },
|
||||||
{ "Name": "ApartmentRoomC", "MaxCapacity": 1600 },
|
{ "Name": "ApartmentRoomC", "MaxCapacity": 1600 },
|
||||||
{ "Name": "DuviriHallway", "MaxCapacity": 1600 }
|
{ "Name": "DuviriHallway", "MaxCapacity": 1600 }
|
||||||
],
|
],
|
||||||
"FavouriteLoadouts": []
|
"FavouriteLoadouts": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
{
|
{
|
||||||
"Inbox": [
|
"Inbox": [
|
||||||
|
{
|
||||||
|
"sndr": "/Lotus/Language/Bosses/Ordis",
|
||||||
|
"msg": "/Lotus/Language/Inbox/ThankYouFreeMultipleContent",
|
||||||
|
"countedAtt": [
|
||||||
{
|
{
|
||||||
"sndr": "/Lotus/Language/Bosses/Ordis",
|
"ItemType": "/Lotus/Upgrades/Skins/Promo/Twitch/OgrisTwitchSkin",
|
||||||
"msg": "/Lotus/Language/Inbox/ThankYouFreeMultipleContent",
|
"ItemCount": 1
|
||||||
"countedAtt": [
|
},
|
||||||
{
|
{
|
||||||
"ItemType": "/Lotus/Upgrades/Skins/Promo/Twitch/OgrisTwitchSkin",
|
"ItemType": "/Lotus/Weapons/ClanTech/Chemical/RocketLauncher",
|
||||||
"ItemCount": 1
|
"ItemCount": 1
|
||||||
},
|
|
||||||
{
|
|
||||||
"ItemType": "/Lotus/Weapons/ClanTech/Chemical/RocketLauncher",
|
|
||||||
"ItemCount": 1
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"sub": "/Lotus/Language/Inbox/ThankYouFreeMultipleSubject",
|
|
||||||
"icon": "/Lotus/Interface/Icons/Npcs/Ordis.png",
|
|
||||||
"highPriority": true,
|
|
||||||
"messageId": "removed",
|
|
||||||
"date": { "$date": { "$numberLong": "removed" } },
|
|
||||||
"r": true
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"sub": "/Lotus/Language/Inbox/ThankYouFreeMultipleSubject",
|
||||||
|
"icon": "/Lotus/Interface/Icons/Npcs/Ordis.png",
|
||||||
|
"highPriority": true,
|
||||||
|
"messageId": "removed",
|
||||||
|
"date": { "$date": { "$numberLong": "removed" } },
|
||||||
|
"r": true
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,131 +1,131 @@
|
|||||||
{
|
{
|
||||||
"SubscribedToEmails": 0,
|
"SubscribedToEmails": 0,
|
||||||
"Created": { "$date": { "$numberLong": "removed" } },
|
"Created": { "$date": { "$numberLong": "removed" } },
|
||||||
"SubscribedToEmailsPersonalized": 0,
|
"SubscribedToEmailsPersonalized": 0,
|
||||||
"RewardSeed": -123123123123123,
|
"RewardSeed": -123123123123123,
|
||||||
"CrewMemberBin": { "Slots": 3 },
|
"CrewMemberBin": { "Slots": 3 },
|
||||||
"CrewShipSalvageBin": { "Slots": 8 },
|
"CrewShipSalvageBin": { "Slots": 8 },
|
||||||
"DrifterMelee": [
|
"DrifterMelee": [
|
||||||
{
|
{
|
||||||
"ItemType": "/Lotus/Types/Friendly/PlayerControllable/Weapons/DuviriDualSwords",
|
"ItemType": "/Lotus/Types/Friendly/PlayerControllable/Weapons/DuviriDualSwords",
|
||||||
"ItemId": { "$oid": "removed" }
|
"ItemId": { "$oid": "removed" }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"FusionPoints": 0,
|
"FusionPoints": 0,
|
||||||
"MechBin": { "Slots": 4 },
|
"MechBin": { "Slots": 4 },
|
||||||
"OperatorAmpBin": { "Slots": 8 },
|
"OperatorAmpBin": { "Slots": 8 },
|
||||||
"PveBonusLoadoutBin": { "Slots": 0 },
|
"PveBonusLoadoutBin": { "Slots": 0 },
|
||||||
"PvpBonusLoadoutBin": { "Slots": 0 },
|
"PvpBonusLoadoutBin": { "Slots": 0 },
|
||||||
"RandomModBin": { "Slots": 15 },
|
"RandomModBin": { "Slots": 15 },
|
||||||
"RegularCredits": 0,
|
"RegularCredits": 0,
|
||||||
"SentinelBin": { "Slots": 10 },
|
"SentinelBin": { "Slots": 10 },
|
||||||
"SpaceSuitBin": { "Slots": 4 },
|
"SpaceSuitBin": { "Slots": 4 },
|
||||||
"SpaceWeaponBin": { "Slots": 4 },
|
"SpaceWeaponBin": { "Slots": 4 },
|
||||||
"SuitBin": { "Slots": 2 },
|
"SuitBin": { "Slots": 2 },
|
||||||
"WeaponBin": { "Slots": 8 },
|
"WeaponBin": { "Slots": 8 },
|
||||||
"LastInventorySync": { "$oid": "removed" },
|
"LastInventorySync": { "$oid": "removed" },
|
||||||
"NextRefill": { "$date": { "$numberLong": "removed" } },
|
"NextRefill": { "$date": { "$numberLong": "removed" } },
|
||||||
"ActiveLandscapeTraps": [],
|
"ActiveLandscapeTraps": [],
|
||||||
"ChallengeProgress": [],
|
"ChallengeProgress": [],
|
||||||
"CrewMembers": [],
|
"CrewMembers": [],
|
||||||
"CrewShips": [],
|
"CrewShips": [],
|
||||||
"CrewShipHarnesses": [],
|
"CrewShipHarnesses": [],
|
||||||
"CrewShipSalvagedWeapons": [],
|
"CrewShipSalvagedWeapons": [],
|
||||||
"CrewShipSalvagedWeaponSkins": [],
|
"CrewShipSalvagedWeaponSkins": [],
|
||||||
"CrewShipWeapons": [],
|
"CrewShipWeapons": [],
|
||||||
"CrewShipWeaponSkins": [],
|
"CrewShipWeaponSkins": [],
|
||||||
"DataKnives": [],
|
"DataKnives": [],
|
||||||
"DrifterGuns": [],
|
"DrifterGuns": [],
|
||||||
"Drones": [],
|
"Drones": [],
|
||||||
"Horses": [],
|
"Horses": [],
|
||||||
"Hoverboards": [],
|
"Hoverboards": [],
|
||||||
"KubrowPets": [],
|
"KubrowPets": [],
|
||||||
"KubrowPetEggs": [],
|
"KubrowPetEggs": [],
|
||||||
"KubrowPetPrints": [],
|
"KubrowPetPrints": [],
|
||||||
"LongGuns": [],
|
"LongGuns": [],
|
||||||
"MechSuits": [],
|
"MechSuits": [],
|
||||||
"Melee": [],
|
"Melee": [],
|
||||||
"MoaPets": [],
|
"MoaPets": [],
|
||||||
"OperatorAmps": [],
|
"OperatorAmps": [],
|
||||||
"OperatorLoadOuts": [],
|
"OperatorLoadOuts": [],
|
||||||
"AdultOperatorLoadOuts": [],
|
"AdultOperatorLoadOuts": [],
|
||||||
"KahlLoadOuts": [],
|
"KahlLoadOuts": [],
|
||||||
"PendingRecipes": [],
|
"PendingRecipes": [],
|
||||||
"PersonalGoalProgress": [],
|
"PersonalGoalProgress": [],
|
||||||
"PersonalTechProjects": [],
|
"PersonalTechProjects": [],
|
||||||
"Pistols": [],
|
"Pistols": [],
|
||||||
"QualifyingInvasions": [],
|
"QualifyingInvasions": [],
|
||||||
"RepVotes": [],
|
"RepVotes": [],
|
||||||
"Scoops": [],
|
"Scoops": [],
|
||||||
"Sentinels": [],
|
"Sentinels": [],
|
||||||
"SentinelWeapons": [],
|
"SentinelWeapons": [],
|
||||||
"Ships": [{ "ItemType": "/Lotus/Types/Items/Ships/DefaultShip", "ItemId": { "$oid": "123123" } }],
|
"Ships": [{ "ItemType": "/Lotus/Types/Items/Ships/DefaultShip", "ItemId": { "$oid": "123123" } }],
|
||||||
"SpaceGuns": [],
|
"SpaceGuns": [],
|
||||||
"SpaceMelee": [],
|
"SpaceMelee": [],
|
||||||
"SpaceSuits": [],
|
"SpaceSuits": [],
|
||||||
"SpecialItems": [],
|
"SpecialItems": [],
|
||||||
"StepSequencers": [],
|
"StepSequencers": [],
|
||||||
"Suits": [],
|
"Suits": [],
|
||||||
"Upgrades": [],
|
"Upgrades": [],
|
||||||
"WeaponSkins": [],
|
"WeaponSkins": [],
|
||||||
"Boosters": [],
|
"Boosters": [],
|
||||||
"Consumables": [],
|
"Consumables": [],
|
||||||
"EmailItems": [],
|
"EmailItems": [],
|
||||||
"FlavourItems": [],
|
"FlavourItems": [],
|
||||||
"FocusUpgrades": [],
|
"FocusUpgrades": [],
|
||||||
"FusionTreasures": [],
|
"FusionTreasures": [],
|
||||||
"LeagueTickets": [],
|
"LeagueTickets": [],
|
||||||
"LevelKeys": [],
|
"LevelKeys": [],
|
||||||
"LoreFragmentScans": [],
|
"LoreFragmentScans": [],
|
||||||
"MiscItems": [],
|
"MiscItems": [],
|
||||||
"PendingSpectreLoadouts": [],
|
"PendingSpectreLoadouts": [],
|
||||||
"Quests": [],
|
"Quests": [],
|
||||||
"QuestKeys": [],
|
"QuestKeys": [],
|
||||||
"RawUpgrades": [],
|
"RawUpgrades": [],
|
||||||
"Recipes": [],
|
"Recipes": [],
|
||||||
"Robotics": [],
|
"Robotics": [],
|
||||||
"ShipDecorations": [],
|
"ShipDecorations": [],
|
||||||
"SpectreLoadouts": [],
|
"SpectreLoadouts": [],
|
||||||
"XPInfo": [],
|
"XPInfo": [],
|
||||||
"CrewShipAmmo": [],
|
"CrewShipAmmo": [],
|
||||||
"CrewShipRawSalvage": [],
|
"CrewShipRawSalvage": [],
|
||||||
"EvolutionProgress": [],
|
"EvolutionProgress": [],
|
||||||
"Missions": [],
|
"Missions": [],
|
||||||
"TauntHistory": [],
|
"TauntHistory": [],
|
||||||
"CompletedSyndicates": [],
|
"CompletedSyndicates": [],
|
||||||
"UsedDailyDeals": [],
|
"UsedDailyDeals": [],
|
||||||
"DailyAffiliation": 16000,
|
"DailyAffiliation": 16000,
|
||||||
"DailyAffiliationPvp": 16000,
|
"DailyAffiliationPvp": 16000,
|
||||||
"DailyAffiliationLibrary": 16000,
|
"DailyAffiliationLibrary": 16000,
|
||||||
"DailyAffiliationCetus": 16000,
|
"DailyAffiliationCetus": 16000,
|
||||||
"DailyAffiliationQuills": 16000,
|
"DailyAffiliationQuills": 16000,
|
||||||
"DailyAffiliationSolaris": 16000,
|
"DailyAffiliationSolaris": 16000,
|
||||||
"DailyAffiliationVentkids": 16000,
|
"DailyAffiliationVentkids": 16000,
|
||||||
"DailyAffiliationVox": 16000,
|
"DailyAffiliationVox": 16000,
|
||||||
"DailyAffiliationEntrati": 16000,
|
"DailyAffiliationEntrati": 16000,
|
||||||
"DailyAffiliationNecraloid": 16000,
|
"DailyAffiliationNecraloid": 16000,
|
||||||
"DailyAffiliationZariman": 16000,
|
"DailyAffiliationZariman": 16000,
|
||||||
"DailyAffiliationKahl": 16000,
|
"DailyAffiliationKahl": 16000,
|
||||||
"DailyFocus": 250000,
|
"DailyFocus": 250000,
|
||||||
"GiftsRemaining": 8,
|
"GiftsRemaining": 8,
|
||||||
"LibraryAvailableDailyTaskInfo": {
|
"LibraryAvailableDailyTaskInfo": {
|
||||||
"EnemyTypes": ["/Lotus/Types/Enemies/Orokin/OrokinBladeSawmanAvatar"],
|
"EnemyTypes": ["/Lotus/Types/Enemies/Orokin/OrokinBladeSawmanAvatar"],
|
||||||
"EnemyLocTag": "/Lotus/Language/Game/OrokinBladeSawman",
|
"EnemyLocTag": "/Lotus/Language/Game/OrokinBladeSawman",
|
||||||
"EnemyIcon": "/Lotus/Interface/Icons/Npcs/Orokin/OrokinBladeSawman.png",
|
"EnemyIcon": "/Lotus/Interface/Icons/Npcs/Orokin/OrokinBladeSawman.png",
|
||||||
"ScansRequired": 4,
|
"ScansRequired": 4,
|
||||||
"RewardStoreItem": "/Lotus/StoreItems/Upgrades/Mods/FusionBundles/UncommonFusionBundle",
|
"RewardStoreItem": "/Lotus/StoreItems/Upgrades/Mods/FusionBundles/UncommonFusionBundle",
|
||||||
"RewardQuantity": 10,
|
"RewardQuantity": 10,
|
||||||
"RewardStanding": 10000
|
"RewardStanding": 10000
|
||||||
},
|
},
|
||||||
"DuviriInfo": { "Seed": 123123123123123123, "NumCompletions": 0 },
|
"DuviriInfo": { "Seed": 123123123123123123, "NumCompletions": 0 },
|
||||||
"TradesRemaining": 0,
|
"TradesRemaining": 0,
|
||||||
"HasContributedToDojo": false,
|
"HasContributedToDojo": false,
|
||||||
"HasResetAccount": false,
|
"HasResetAccount": false,
|
||||||
"PendingCoupon": {
|
"PendingCoupon": {
|
||||||
"Expiry": { "$date": { "$numberLong": "0" } },
|
"Expiry": { "$date": { "$numberLong": "0" } },
|
||||||
"Discount": 0
|
"Discount": 0
|
||||||
},
|
},
|
||||||
"PremiumCreditsFree": 0,
|
"PremiumCreditsFree": 0,
|
||||||
"ReceivedStartingGear": true,
|
"ReceivedStartingGear": true,
|
||||||
"StoryModeChoice": "WARFRAME"
|
"StoryModeChoice": "WARFRAME"
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"DailyTributeInfo": {
|
"DailyTributeInfo": {
|
||||||
"IsMilestoneDay": false,
|
"IsMilestoneDay": false,
|
||||||
"IsChooseRewardSet": true,
|
"IsChooseRewardSet": true,
|
||||||
"LoginDays": 1337,
|
"LoginDays": 1337,
|
||||||
"NextMilestoneReward": "",
|
"NextMilestoneReward": "",
|
||||||
"NextMilestoneDay": 50
|
"NextMilestoneDay": 50
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
70
static/fixed_responses/modularWeaponSale.json
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
"SaleInfos": [
|
||||||
|
{
|
||||||
|
"Name": "Ostron",
|
||||||
|
"Expiry": { "$date": { "$numberLong": "1683586800000" } },
|
||||||
|
"Revision": 3045,
|
||||||
|
"Weapons": [
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Weapons/Ostron/Melee/LotusModularWeapon",
|
||||||
|
"PremiumPrice": 171,
|
||||||
|
"ModularParts": [
|
||||||
|
"/Lotus/Weapons/Ostron/Melee/ModularMelee01/Handle/HandleFive",
|
||||||
|
"/Lotus/Weapons/Ostron/Melee/ModularMelee01/Tip/TipSix",
|
||||||
|
"/Lotus/Weapons/Ostron/Melee/ModularMelee01/Balance/BalanceDamageICritII"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "SolarisUnitedHoverboard",
|
||||||
|
"Expiry": { "$date": { "$numberLong": "1683586800000" } },
|
||||||
|
"Revision": 1650,
|
||||||
|
"Weapons": [
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Vehicles/Hoverboard/HoverboardSuit",
|
||||||
|
"PremiumPrice": 51,
|
||||||
|
"ModularParts": [
|
||||||
|
"/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardCorpusC/HoverboardCorpusCDeck",
|
||||||
|
"/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardCorpusC/HoverboardCorpusCEngine",
|
||||||
|
"/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardCorpusB/HoverboardCorpusBFront",
|
||||||
|
"/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardCorpusC/HoverboardCorpusCJet"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "SolarisUnitedMoaPet",
|
||||||
|
"Expiry": { "$date": { "$numberLong": "1683586800000" } },
|
||||||
|
"Revision": 1650,
|
||||||
|
"Weapons": [
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Friendly/Pets/MoaPets/MoaPetPowerSuit",
|
||||||
|
"PremiumPrice": 175,
|
||||||
|
"ModularParts": [
|
||||||
|
"/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetLegC",
|
||||||
|
"/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetHeadOloro",
|
||||||
|
"/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetEngineKrisys",
|
||||||
|
"/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetPayloadThermocor"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "SolarisUnitedKitGun",
|
||||||
|
"Expiry": { "$date": { "$numberLong": "1683586800000" } },
|
||||||
|
"Revision": 1650,
|
||||||
|
"Weapons": [
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Weapons/SolarisUnited/Primary/LotusModularPrimaryBeam",
|
||||||
|
"PremiumPrice": 157,
|
||||||
|
"ModularParts": [
|
||||||
|
"/Lotus/Weapons/SolarisUnited/Primary/SUModularPrimarySet1/Handles/SUModularPrimaryHandleAPart",
|
||||||
|
"/Lotus/Weapons/SolarisUnited/Secondary/SUModularSecondarySet1/Barrel/SUModularSecondaryBarrelDPart",
|
||||||
|
"/Lotus/Weapons/SolarisUnited/Secondary/SUModularSecondarySet1/Clip/SUModularCritIReloadIIClipPart"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"InventoryChanges": {
|
"InventoryChanges": {
|
||||||
"WeaponBin": { "count": 1, "platinum": 0, "Slots": -1 },
|
"WeaponBin": { "count": 1, "platinum": 0, "Slots": -1 },
|
||||||
"Suits": [
|
"Suits": [
|
||||||
{
|
{
|
||||||
"ItemType": "/Lotus/Powersuits/Ninja/Ninja",
|
"ItemType": "/Lotus/Powersuits/Ninja/Ninja",
|
||||||
"Configs": [],
|
"Configs": [],
|
||||||
"ItemId": { "$oid": "123123123123" }
|
"ItemId": { "$oid": "123123123123" }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"RegularCredits": -25000
|
"RegularCredits": -25000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
i dont think the comment is necessary
i dont think the comment is necessary
check if inventory is undefined before trying
toJson()
check if inventory is undefined before trying
toJson()
it is important, because it is not present in the original response.
it is important, because it is not present in the original response.
?. checks for undefined!
?. checks for undefined!
this comment doesn't explain nothing, it says its using accountOwnerId to find an inventory which is obvious.
this comment doesn't explain nothing, it says its using accountOwnerId to find an inventory which is obvious.
that's why you check before so you dont two undefined checks
that's why you check before so you dont two undefined checks
it explains a lot.
I added the field accountOwnerId and everyone who knows the inventory structure would know the field is not originally there.
The purpose of the field is explained: it exists to find an account's corresponding inventory.
it explains a lot.
I added the field accountOwnerId and everyone who knows the inventory structure would know the field is not originally there.
The purpose of the field is explained: it exists to find an account's corresponding inventory.
good suggestion!
good suggestion!
I understand now what you mean
I understand now what you mean
should that belong then inside inventoryModel.ts?
should that belong then inside inventoryModel.ts?