From 11d19fe7e945abf3439323c7e25aabc369144af0 Mon Sep 17 00:00:00 2001 From: Master Date: Sat, 6 Jul 2024 01:05:36 +0800 Subject: [PATCH] fix getVendorInfoController --- .../api/getVendorInfoController.ts | 13 +- .../ArchimedeanVendorManifest.json | 38 --- .../GuildAdvertisementVendorManifest.json | 0 .../getVendorInfo/MaskSalesmanManifest.json | 301 ------------------ 4 files changed, 12 insertions(+), 340 deletions(-) delete mode 100644 static/fixed_responses/getVendorInfo/ArchimedeanVendorManifest.json create mode 100644 static/fixed_responses/getVendorInfo/GuildAdvertisementVendorManifest.json delete mode 100644 static/fixed_responses/getVendorInfo/MaskSalesmanManifest.json diff --git a/src/controllers/api/getVendorInfoController.ts b/src/controllers/api/getVendorInfoController.ts index a3459d98..97d1400e 100644 --- a/src/controllers/api/getVendorInfoController.ts +++ b/src/controllers/api/getVendorInfoController.ts @@ -1,4 +1,6 @@ import { RequestHandler } from "express"; +import GuildAdvertisementVendorManifest from "@/static/fixed_responses/getVendorInfo/GuildAdvertisementVendorManifest.json"; +import ZarimanCommisionsManifestArchimedean from "@/static/fixed_responses/getVendorInfo/ZarimanCommisionsManifestArchimedean.json"; import { ExportVendors } from "warframe-public-export-plus"; import { IMongoDate, IOid } from "@/src/types/commonTypes"; import { Types } from "mongoose"; @@ -55,6 +57,15 @@ export const getVendorInfoController: RequestHandler = (req, res) => { }); res.json({ VendorInfo: result }); } else { - throw new Error(`Unknown vendor: ${vendor}`); + switch (req.query.vendor as string) { + case "/Lotus/Types/Game/VendorManifests/Hubs/GuildAdvertisementVendorManifest": + res.json(GuildAdvertisementVendorManifest); + break; + case "/Lotus/Types/Game/VendorManifests/Zariman/ZarimanCommisionsManifestArchimedean": + res.json(ZarimanCommisionsManifestArchimedean); + break; + default: + throw new Error(`Unknown vendor: ${vendor}`); + } } }; diff --git a/static/fixed_responses/getVendorInfo/ArchimedeanVendorManifest.json b/static/fixed_responses/getVendorInfo/ArchimedeanVendorManifest.json deleted file mode 100644 index df3dc048..00000000 --- a/static/fixed_responses/getVendorInfo/ArchimedeanVendorManifest.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "VendorInfo": { - "_id": { "$oid": "62695b0467e5d379750f9f75" }, - "TypeName": "/Lotus/Types/Game/VendorManifests/Zariman/ArchimedeanVendorManifest", - "ItemManifest": [ - { - "StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/VoidPlumeAOrnament", - "ItemPrices": [{ "ItemCount": 1, "ItemType": "/Lotus/Types/Gameplay/Zariman/Resources/VoidAngelItem", "ProductCategory": "MiscItems" }], - "Bin": "BIN_0", - "QuantityMultiplier": 1, - "Expiry": { "$date": { "$numberLong": "9999999000000" } }, - "AllowMultipurchase": true, - "Id": { "$oid": "63ed01ef4c37f93d0b797826" } - }, - { - "StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/VoidPlumeBOrnament", - "ItemPrices": [{ "ItemCount": 1, "ItemType": "/Lotus/Types/Gameplay/Zariman/Resources/VoidAngelItem", "ProductCategory": "MiscItems" }], - "Bin": "BIN_0", - "QuantityMultiplier": 1, - "Expiry": { "$date": { "$numberLong": "9999999000000" } }, - "AllowMultipurchase": true, - "Id": { "$oid": "63ed01ef4c37f93d0b797827" } - }, - { - "StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/Kuva", - "ItemPrices": [{ "ItemCount": 5, "ItemType": "/Lotus/Types/Gameplay/Zariman/Resources/VoidAngelItem", "ProductCategory": "MiscItems" }], - "Bin": "BIN_0", - "QuantityMultiplier": 35000, - "Expiry": { "$date": { "$numberLong": "9999999000000" } }, - "PurchaseQuantityLimit": 1, - "AllowMultipurchase": false, - "Id": { "$oid": "66664112af1177b5070ab882" } - } - ], - "PropertyTextHash": "DB7BF03C3FE6D0036A4DC30066A9A17E", - "Expiry": { "$date": { "$numberLong": "9999999000000" } } - } -} diff --git a/static/fixed_responses/getVendorInfo/GuildAdvertisementVendorManifest.json b/static/fixed_responses/getVendorInfo/GuildAdvertisementVendorManifest.json new file mode 100644 index 00000000..e69de29b diff --git a/static/fixed_responses/getVendorInfo/MaskSalesmanManifest.json b/static/fixed_responses/getVendorInfo/MaskSalesmanManifest.json deleted file mode 100644 index 85aa7eac..00000000 --- a/static/fixed_responses/getVendorInfo/MaskSalesmanManifest.json +++ /dev/null @@ -1,301 +0,0 @@ -{ - "VendorInfo": { - "_id": { - "$oid": "598a090d9a4a313746fd1f24" - }, - "TypeName": "/Lotus/Types/Game/VendorManifests/Ostron/MaskSalesmanManifest", - "ItemManifest": [ - { - "StoreItem": "/Lotus/StoreItems/Upgrades/Skins/Ostron/RevenantMask", - "ItemPrices": [ - { - "ItemCount": 1, - "ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/CetusWispItem", - "ProductCategory": "MiscItems" - } - ], - "Bin": "BIN_0", - "QuantityMultiplier": 1, - "Expiry": { - "$date": { - "$numberLong": "9999999000000" - } - }, - "AllowMultipurchase": true, - "Id": { - "$oid": "63ed01ef4c37f93d0b797674" - } - }, - { - "StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Plushies/PlushyThumper", - "ItemPrices": [ - { - "ItemCount": 2, - "ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/CetusWispItem", - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/BothUncommonFishBPartItem", - "ItemCount": 10, - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/NistlebrushItem", - "ItemCount": 10, - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Items/Gems/Eidolon/CommonOreAAlloyAItem", - "ItemCount": 32, - "ProductCategory": "MiscItems" - } - ], - "Bin": "BIN_0", - "QuantityMultiplier": 1, - "Expiry": { - "$date": { - "$numberLong": "9999999000000" - } - }, - "AllowMultipurchase": true, - "Id": { - "$oid": "63ed01ef4c37f93d0b797675" - } - }, - { - "StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Plushies/PlushyThumperMedium", - "ItemPrices": [ - { - "ItemCount": 4, - "ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/CetusWispItem", - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Items/Gems/Eidolon/CommonGemBCutAItem", - "ItemCount": 24, - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/BothUncommonFishAPartItem", - "ItemCount": 18, - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/BothUncommonFishBPartItem", - "ItemCount": 27, - "ProductCategory": "MiscItems" - } - ], - "Bin": "BIN_1", - "QuantityMultiplier": 1, - "Expiry": { - "$date": { - "$numberLong": "9999999000000" - } - }, - "AllowMultipurchase": true, - "Id": { - "$oid": "63ed01ef4c37f93d0b797676" - } - }, - { - "StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Plushies/PlushyThumperLarge", - "ItemPrices": [ - { - "ItemCount": 6, - "ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/CetusWispItem", - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Items/Gems/Eidolon/CommonGemACutAItem", - "ItemCount": 35, - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/BothCommonFishAPartItem", - "ItemCount": 95, - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/NistlebrushItem", - "ItemCount": 60, - "ProductCategory": "MiscItems" - } - ], - "Bin": "BIN_0", - "QuantityMultiplier": 1, - "Expiry": { - "$date": { - "$numberLong": "9999999000000" - } - }, - "AllowMultipurchase": true, - "Id": { - "$oid": "63ed01ef4c37f93d0b797677" - } - }, - { - "StoreItem": "/Lotus/StoreItems/Types/Recipes/SynthicatorRecipes/FlareBlueBlueprint", - "ItemPrices": [ - { - "ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/BothUncommonFishBPartItem", - "ItemCount": 10, - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/DayCommonFishCPartItem", - "ItemCount": 10, - "ProductCategory": "MiscItems" - } - ], - "Bin": "BIN_0", - "QuantityMultiplier": 1, - "Expiry": { - "$date": { - "$numberLong": "9999999000000" - } - }, - "AllowMultipurchase": true, - "Id": { - "$oid": "6651291214e90115b91b50a1" - } - }, - { - "StoreItem": "/Lotus/StoreItems/Types/Recipes/SynthicatorRecipes/FlareRedBlueprint", - "ItemPrices": [ - { - "ItemType": "/Lotus/Types/Items/Gems/Eidolon/CommonOreAAlloyAItem", - "ItemCount": 37, - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/BothUncommonFishAPartItem", - "ItemCount": 7, - "ProductCategory": "MiscItems" - } - ], - "Bin": "BIN_0", - "QuantityMultiplier": 1, - "Expiry": { - "$date": { - "$numberLong": "9999999000000" - } - }, - "AllowMultipurchase": true, - "Id": { - "$oid": "6651291214e90115b91b50a2" - } - }, - { - "StoreItem": "/Lotus/StoreItems/Upgrades/Skins/Ostron/VoltMask", - "ItemPrices": [ - { - "ItemType": "/Lotus/Types/Items/Gems/Eidolon/CommonOreBAlloyBItem", - "ItemCount": 34, - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/GrokdrulItem", - "ItemCount": 17, - "ProductCategory": "MiscItems" - } - ], - "Bin": "BIN_0", - "QuantityMultiplier": 1, - "Expiry": { - "$date": { - "$numberLong": "9999999000000" - } - }, - "AllowMultipurchase": true, - "Id": { - "$oid": "6651291214e90115b91b50a3" - } - }, - { - "StoreItem": "/Lotus/StoreItems/Upgrades/Skins/Ostron/MagMask", - "ItemPrices": [ - { - "ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/DayCommonFishBPartItem", - "ItemCount": 16, - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/ForestRodentPartItem", - "ItemCount": 5, - "ProductCategory": "MiscItems" - } - ], - "Bin": "BIN_0", - "QuantityMultiplier": 1, - "Expiry": { - "$date": { - "$numberLong": "9999999000000" - } - }, - "AllowMultipurchase": true, - "Id": { - "$oid": "6651291214e90115b91b50a4" - } - }, - { - "StoreItem": "/Lotus/StoreItems/Upgrades/Skins/Ostron/ExcaliburMask", - "ItemPrices": [ - { - "ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/BirdOfPreyPartItem", - "ItemCount": 5, - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/GrokdrulItem", - "ItemCount": 20, - "ProductCategory": "MiscItems" - } - ], - "Bin": "BIN_0", - "QuantityMultiplier": 1, - "Expiry": { - "$date": { - "$numberLong": "9999999000000" - } - }, - "AllowMultipurchase": true, - "Id": { - "$oid": "6651291214e90115b91b50a5" - } - }, - { - "StoreItem": "/Lotus/StoreItems/Upgrades/Skins/Ostron/GrineerMask", - "ItemPrices": [ - { - "ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/DayCommonFishBPartItem", - "ItemCount": 20, - "ProductCategory": "MiscItems" - }, - { - "ItemType": "/Lotus/Types/Items/Gems/Eidolon/CommonOreAAlloyAItem", - "ItemCount": 31, - "ProductCategory": "MiscItems" - } - ], - "Bin": "BIN_1", - "QuantityMultiplier": 1, - "Expiry": { - "$date": { - "$numberLong": "9999999000000" - } - }, - "AllowMultipurchase": true, - "Id": { - "$oid": "6651291214e90115b91b50a6" - } - } - ], - "PropertyTextHash": "6AACA376DA34B35B5C16F1B40DBC017D", - "Expiry": { - "$date": { - "$numberLong": "9999999000000" - } - } - } -}