Merge branch 'main' of https://onlyg.it/OpenWF/SpaceNinjaServer
This commit is contained in:
commit
fa7a48dcca
8
package-lock.json
generated
8
package-lock.json
generated
@ -12,7 +12,7 @@
|
|||||||
"copyfiles": "^2.4.1",
|
"copyfiles": "^2.4.1",
|
||||||
"express": "^5",
|
"express": "^5",
|
||||||
"mongoose": "^8.9.4",
|
"mongoose": "^8.9.4",
|
||||||
"warframe-public-export-plus": "^0.5.29",
|
"warframe-public-export-plus": "^0.5.30",
|
||||||
"warframe-riven-info": "^0.1.2",
|
"warframe-riven-info": "^0.1.2",
|
||||||
"winston": "^3.17.0",
|
"winston": "^3.17.0",
|
||||||
"winston-daily-rotate-file": "^5.0.0"
|
"winston-daily-rotate-file": "^5.0.0"
|
||||||
@ -4093,9 +4093,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/warframe-public-export-plus": {
|
"node_modules/warframe-public-export-plus": {
|
||||||
"version": "0.5.29",
|
"version": "0.5.30",
|
||||||
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.29.tgz",
|
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.30.tgz",
|
||||||
"integrity": "sha512-D61CFiJTr/LIQCvyZ03DgudUBpJDqrOTdNPNeB0kY21lmPHw1auDg4CNW2T1JaG0nL5K1hu9ypvnfXzno2omMA=="
|
"integrity": "sha512-vzs+naEqp3iFZTbgIky4jiNbjNIovuR4oSimrFiuyIbrnfTlfXFzDfzT0hG2rgS8yEXBAbOcv2Zfm3fmWuZ0Kg=="
|
||||||
},
|
},
|
||||||
"node_modules/warframe-riven-info": {
|
"node_modules/warframe-riven-info": {
|
||||||
"version": "0.1.2",
|
"version": "0.1.2",
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
"copyfiles": "^2.4.1",
|
"copyfiles": "^2.4.1",
|
||||||
"express": "^5",
|
"express": "^5",
|
||||||
"mongoose": "^8.9.4",
|
"mongoose": "^8.9.4",
|
||||||
"warframe-public-export-plus": "^0.5.29",
|
"warframe-public-export-plus": "^0.5.30",
|
||||||
"warframe-riven-info": "^0.1.2",
|
"warframe-riven-info": "^0.1.2",
|
||||||
"winston": "^3.17.0",
|
"winston": "^3.17.0",
|
||||||
"winston-daily-rotate-file": "^5.0.0"
|
"winston-daily-rotate-file": "^5.0.0"
|
||||||
|
@ -18,6 +18,7 @@ export const giveKeyChainTriggeredMessageController: RequestHandler = async (req
|
|||||||
msg: keyChainMessage.body,
|
msg: keyChainMessage.body,
|
||||||
sub: keyChainMessage.title,
|
sub: keyChainMessage.title,
|
||||||
att: keyChainMessage.attachments.length > 0 ? keyChainMessage.attachments : undefined,
|
att: keyChainMessage.attachments.length > 0 ? keyChainMessage.attachments : undefined,
|
||||||
|
countedAtt: keyChainMessage.countedAttachments.length > 0 ? keyChainMessage.countedAttachments : undefined,
|
||||||
icon: keyChainMessage.icon ?? "",
|
icon: keyChainMessage.icon ?? "",
|
||||||
transmission: keyChainMessage.transmission ?? "",
|
transmission: keyChainMessage.transmission ?? "",
|
||||||
highPriority: keyChainMessage.highPriority ?? false,
|
highPriority: keyChainMessage.highPriority ?? false,
|
||||||
|
@ -10,6 +10,7 @@ import {
|
|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { addItems, getInventory } from "@/src/services/inventoryService";
|
import { addItems, getInventory } from "@/src/services/inventoryService";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
|
import { ExportGear } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const inboxController: RequestHandler = async (req, res) => {
|
export const inboxController: RequestHandler = async (req, res) => {
|
||||||
const { deleteId, lastMessage: latestClientMessageId, messageId } = req.query;
|
const { deleteId, lastMessage: latestClientMessageId, messageId } = req.query;
|
||||||
@ -43,7 +44,10 @@ export const inboxController: RequestHandler = async (req, res) => {
|
|||||||
if (attachmentItems) {
|
if (attachmentItems) {
|
||||||
await addItems(
|
await addItems(
|
||||||
inventory,
|
inventory,
|
||||||
attachmentItems.map(attItem => ({ ItemType: attItem, ItemCount: 1 })),
|
attachmentItems.map(attItem => ({
|
||||||
|
ItemType: attItem,
|
||||||
|
ItemCount: attItem in ExportGear ? (ExportGear[attItem].purchaseQuantity ?? 1) : 1
|
||||||
|
})),
|
||||||
inventoryChanges
|
inventoryChanges
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import { IMissionInventoryUpdateRequest } from "@/src/types/requestTypes";
|
|||||||
import { addMissionInventoryUpdates, addMissionRewards } from "@/src/services/missionInventoryUpdateService";
|
import { addMissionInventoryUpdates, addMissionRewards } from "@/src/services/missionInventoryUpdateService";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getInventoryResponse } from "./inventoryController";
|
import { getInventoryResponse } from "./inventoryController";
|
||||||
|
import { logger } from "@/src/utils/logger";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**** INPUT ****
|
**** INPUT ****
|
||||||
@ -50,6 +51,7 @@ import { getInventoryResponse } from "./inventoryController";
|
|||||||
export const missionInventoryUpdateController: RequestHandler = async (req, res): Promise<void> => {
|
export const missionInventoryUpdateController: RequestHandler = async (req, res): Promise<void> => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
const missionReport = getJSONfromString<IMissionInventoryUpdateRequest>((req.body as string).toString());
|
const missionReport = getJSONfromString<IMissionInventoryUpdateRequest>((req.body as string).toString());
|
||||||
|
logger.debug("mission report:", missionReport);
|
||||||
|
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
const inventoryUpdates = addMissionInventoryUpdates(inventory, missionReport);
|
const inventoryUpdates = addMissionInventoryUpdates(inventory, missionReport);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user