This commit is contained in:
		
							parent
							
								
									29f05cc663
								
							
						
					
					
						commit
						2b3de459c5
					
				
							
								
								
									
										20
									
								
								src/app.ts
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								src/app.ts
									
									
									
									
									
								
							@ -1,17 +1,17 @@
 | 
			
		||||
import express from "express";
 | 
			
		||||
 | 
			
		||||
import bodyParser from "body-parser";
 | 
			
		||||
import { unknownEndpointHandler } from "@/src/middleware/middleware";
 | 
			
		||||
import { requestLogger } from "@/src/middleware/morgenMiddleware";
 | 
			
		||||
import { errorHandler } from "@/src/middleware/errorHandler";
 | 
			
		||||
import { unknownEndpointHandler } from "./middleware/middleware";
 | 
			
		||||
import { requestLogger } from "./middleware/morgenMiddleware";
 | 
			
		||||
import { errorHandler } from "./middleware/errorHandler";
 | 
			
		||||
 | 
			
		||||
import { apiRouter } from "@/src/routes/api";
 | 
			
		||||
import { cacheRouter } from "@/src/routes/cache";
 | 
			
		||||
import { customRouter } from "@/src/routes/custom";
 | 
			
		||||
import { dynamicController } from "@/src/routes/dynamic";
 | 
			
		||||
import { payRouter } from "@/src/routes/pay";
 | 
			
		||||
import { statsRouter } from "@/src/routes/stats";
 | 
			
		||||
import { webuiRouter } from "@/src/routes/webui";
 | 
			
		||||
import { apiRouter } from "./routes/api";
 | 
			
		||||
import { cacheRouter } from "./routes/cache";
 | 
			
		||||
import { customRouter } from "./routes/custom";
 | 
			
		||||
import { dynamicController } from "./routes/dynamic";
 | 
			
		||||
import { payRouter } from "./routes/pay";
 | 
			
		||||
import { statsRouter } from "./routes/stats";
 | 
			
		||||
import { webuiRouter } from "./routes/webui";
 | 
			
		||||
 | 
			
		||||
const app = express();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const abandonLibraryDailyTaskController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -5,10 +5,10 @@ import {
 | 
			
		||||
    hasGuildPermission,
 | 
			
		||||
    removeDojoDeco,
 | 
			
		||||
    removeDojoRoom
 | 
			
		||||
} from "@/src/services/guildService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
			
		||||
} from "../../services/guildService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { GuildPermission } from "../../types/guildTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const abortDojoComponentController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
			
		||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "../../services/guildService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { GuildPermission } from "../../types/guildTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const abortDojoComponentDestructionController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,13 +1,13 @@
 | 
			
		||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { toOid } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import {
 | 
			
		||||
    createVeiledRivenFingerprint,
 | 
			
		||||
    createUnveiledRivenFingerprint,
 | 
			
		||||
    rivenRawToRealWeighted
 | 
			
		||||
} from "@/src/helpers/rivenHelper";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addMods, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getRandomElement } from "@/src/services/rngService";
 | 
			
		||||
} from "../../helpers/rivenHelper";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { addMods, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { getRandomElement } from "../../services/rngService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportUpgrades } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { Friendship } from "@/src/models/friendModel";
 | 
			
		||||
import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "@/src/services/friendService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IFriendInfo } from "@/src/types/friendTypes";
 | 
			
		||||
import { toOid } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { Friendship } from "../../models/friendModel";
 | 
			
		||||
import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "../../services/friendService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { IFriendInfo } from "../../types/friendTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const addFriendController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { Inventory } from "../../models/inventoryModels/inventoryModel";
 | 
			
		||||
 | 
			
		||||
export const addFriendImageController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { Account, Ignore } from "@/src/models/loginModel";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IFriendInfo } from "@/src/types/friendTypes";
 | 
			
		||||
import { toOid } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { Account, Ignore } from "../../models/loginModel";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { IFriendInfo } from "../../types/friendTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const addIgnoredUserController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,11 @@
 | 
			
		||||
import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { Friendship } from "@/src/models/friendModel";
 | 
			
		||||
import { Account } from "@/src/models/loginModel";
 | 
			
		||||
import { addInventoryDataToFriendInfo, areFriendsOfFriends } from "@/src/services/friendService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IFriendInfo } from "@/src/types/friendTypes";
 | 
			
		||||
import { toMongoDate, toOid } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { Friendship } from "../../models/friendModel";
 | 
			
		||||
import { Account } from "../../models/loginModel";
 | 
			
		||||
import { addInventoryDataToFriendInfo, areFriendsOfFriends } from "../../services/friendService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { IFriendInfo } from "../../types/friendTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const addPendingFriendController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
import { getJSONfromString, regexEscape } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { createMessage } from "@/src/services/inboxService";
 | 
			
		||||
import { getEffectiveAvatarImageType, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService";
 | 
			
		||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { getJSONfromString, regexEscape } from "../../helpers/stringHelpers";
 | 
			
		||||
import { Alliance, AllianceMember, Guild, GuildMember } from "../../models/guildModel";
 | 
			
		||||
import { createMessage } from "../../services/inboxService";
 | 
			
		||||
import { getEffectiveAvatarImageType, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountForRequest, getSuffixedName } from "../../services/loginService";
 | 
			
		||||
import { GuildPermission } from "../../types/guildTypes";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportFlavour } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,14 +1,14 @@
 | 
			
		||||
import { toMongoDate } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { Guild, GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { Account } from "@/src/models/loginModel";
 | 
			
		||||
import { addInventoryDataToFriendInfo, areFriends } from "@/src/services/friendService";
 | 
			
		||||
import { hasGuildPermission } from "@/src/services/guildService";
 | 
			
		||||
import { createMessage } from "@/src/services/inboxService";
 | 
			
		||||
import { getEffectiveAvatarImageType, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "@/src/services/loginService";
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { GuildPermission, IGuildMemberClient } from "@/src/types/guildTypes";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { toMongoDate } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { Guild, GuildMember } from "../../models/guildModel";
 | 
			
		||||
import { Account } from "../../models/loginModel";
 | 
			
		||||
import { addInventoryDataToFriendInfo, areFriends } from "../../services/friendService";
 | 
			
		||||
import { hasGuildPermission } from "../../services/guildService";
 | 
			
		||||
import { createMessage } from "../../services/inboxService";
 | 
			
		||||
import { getEffectiveAvatarImageType, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "../../services/loginService";
 | 
			
		||||
import { IOid } from "../../types/commonTypes";
 | 
			
		||||
import { GuildPermission, IGuildMemberClient } from "../../types/guildTypes";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportFlavour } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const adoptPetController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getPersonalRooms } from "@/src/services/personalRoomsService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { getPersonalRooms } from "../../services/personalRoomsService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const apartmentController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory, addMods } from "@/src/services/inventoryService";
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { getInventory, addMods } from "../../services/inventoryService";
 | 
			
		||||
import { IOid } from "../../types/commonTypes";
 | 
			
		||||
 | 
			
		||||
export const arcaneCommonController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { colorToShard, combineColors, shardToColor } from "@/src/helpers/shardHelper";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { addMiscItems, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { IMiscItem } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { colorToShard, combineColors, shardToColor } from "../../helpers/shardHelper";
 | 
			
		||||
 | 
			
		||||
export const archonFusionController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import { fromOid, toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { createVeiledRivenFingerprint, rivenRawToRealWeighted } from "@/src/helpers/rivenHelper";
 | 
			
		||||
import { addMiscItems, addMods, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getRandomElement, getRandomWeightedReward, getRandomWeightedRewardUc } from "@/src/services/rngService";
 | 
			
		||||
import { IUpgradeFromClient } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { fromOid, toOid } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { createVeiledRivenFingerprint, rivenRawToRealWeighted } from "../../helpers/rivenHelper";
 | 
			
		||||
import { addMiscItems, addMods, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { getRandomElement, getRandomWeightedReward, getRandomWeightedRewardUc } from "../../services/rngService";
 | 
			
		||||
import { IUpgradeFromClient } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportBoosterPacks, ExportUpgrades, TRarity } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { IInventoryClient, IUpgradeClient } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { addMods, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { IInventoryClient, IUpgradeClient } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { addMods, getInventory } from "../../services/inventoryService";
 | 
			
		||||
 | 
			
		||||
export const artifactsController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { GuildAd } from "@/src/models/guildModel";
 | 
			
		||||
import { getGuildForRequestEx, hasGuildPermission } from "@/src/services/guildService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
			
		||||
import { GuildAd } from "../../models/guildModel";
 | 
			
		||||
import { getGuildForRequestEx, hasGuildPermission } from "../../services/guildService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { GuildPermission } from "../../types/guildTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const cancelGuildAdvertisementController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { GuildPermission, IDojoComponentDatabase } from "@/src/types/guildTypes";
 | 
			
		||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "../../services/guildService";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { GuildPermission, IDojoComponentDatabase } from "../../types/guildTypes";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
 | 
			
		||||
export const changeDojoRootController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { getGuildForRequest, hasGuildPermissionEx } from "@/src/services/guildService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
			
		||||
import { GuildMember } from "../../models/guildModel";
 | 
			
		||||
import { getGuildForRequest, hasGuildPermissionEx } from "../../services/guildService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { GuildPermission } from "../../types/guildTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const changeGuildRankController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const checkDailyMissionBonusController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -2,11 +2,11 @@
 | 
			
		||||
//it will claim a recipe for the user
 | 
			
		||||
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { getRecipe } from "@/src/services/itemDataService";
 | 
			
		||||
import { IOid, IOidWithLegacySupport } from "@/src/types/commonTypes";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { getRecipe } from "../../services/itemDataService";
 | 
			
		||||
import { IOid, IOidWithLegacySupport } from "../../types/commonTypes";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService";
 | 
			
		||||
import {
 | 
			
		||||
    getInventory,
 | 
			
		||||
    updateCurrency,
 | 
			
		||||
@ -17,13 +17,13 @@ import {
 | 
			
		||||
    addKubrowPetPrint,
 | 
			
		||||
    addPowerSuit,
 | 
			
		||||
    addEquipment
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { InventorySlot, IPendingRecipeDatabase } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { toOid2 } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
} from "../../services/inventoryService";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { InventorySlot, IPendingRecipeDatabase } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { toOid2 } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel";
 | 
			
		||||
import { IRecipe } from "warframe-public-export-plus";
 | 
			
		||||
import { EquipmentFeatures, IEquipmentClient, Status } from "@/src/types/equipmentTypes";
 | 
			
		||||
import { EquipmentFeatures, IEquipmentClient, Status } from "../../types/equipmentTypes";
 | 
			
		||||
 | 
			
		||||
interface IClaimCompletedRecipeRequest {
 | 
			
		||||
    RecipeIds: IOid[];
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { combineInventoryChanges, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { combineInventoryChanges, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { handleStoreItemAcquisition } from "../../services/purchaseService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportChallenges } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { addFusionPoints, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { addFusionPoints, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const claimLibraryDailyTaskRewardController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const clearDialogueHistoryController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { checkCalendarAutoAdvance, getCalendarProgress, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
			
		||||
import { getWorldState } from "@/src/services/worldStateService";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { checkCalendarAutoAdvance, getCalendarProgress, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { handleStoreItemAcquisition } from "../../services/purchaseService";
 | 
			
		||||
import { getWorldState } from "../../services/worldStateService";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
// GET request; query parameters: CompletedEventIdx=0&Iteration=4&Version=19&Season=CST_SUMMER
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { IVeiledRivenFingerprint } from "@/src/helpers/rivenHelper";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { addMiscItems, getInventory, updateCurrency } from "../../services/inventoryService";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { IMiscItem } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { IVeiledRivenFingerprint } from "../../helpers/rivenHelper";
 | 
			
		||||
 | 
			
		||||
export const completeRandomModChallengeController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { getAllianceClient } from "@/src/services/guildService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { Alliance, AllianceMember, Guild, GuildMember } from "../../models/guildModel";
 | 
			
		||||
import { getAllianceClient } from "../../services/guildService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const confirmAllianceInvitationController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,17 +1,17 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { Guild, GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { Account } from "@/src/models/loginModel";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { Guild, GuildMember } from "../../models/guildModel";
 | 
			
		||||
import { Account } from "../../models/loginModel";
 | 
			
		||||
import {
 | 
			
		||||
    deleteGuild,
 | 
			
		||||
    getGuildClient,
 | 
			
		||||
    giveClanKey,
 | 
			
		||||
    hasGuildPermission,
 | 
			
		||||
    removeDojoKeyItems
 | 
			
		||||
} from "@/src/services/guildService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "@/src/services/loginService";
 | 
			
		||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
} from "../../services/guildService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "../../services/loginService";
 | 
			
		||||
import { GuildPermission } from "../../types/guildTypes";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import { toMongoDate } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { Guild } from "@/src/models/guildModel";
 | 
			
		||||
import { checkClanAscensionHasRequiredContributors } from "@/src/services/guildService";
 | 
			
		||||
import { addFusionPoints, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { toMongoDate } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { Guild } from "../../models/guildModel";
 | 
			
		||||
import { checkClanAscensionHasRequiredContributors } from "../../services/guildService";
 | 
			
		||||
import { addFusionPoints, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { GuildMember, TGuildDatabaseDocument } from "@/src/models/guildModel";
 | 
			
		||||
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import { GuildMember, TGuildDatabaseDocument } from "../../models/guildModel";
 | 
			
		||||
import { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel";
 | 
			
		||||
import {
 | 
			
		||||
    addGuildMemberMiscItemContribution,
 | 
			
		||||
    getDojoClient,
 | 
			
		||||
@ -8,12 +8,12 @@ import {
 | 
			
		||||
    processDojoBuildMaterialsGathered,
 | 
			
		||||
    scaleRequiredCount,
 | 
			
		||||
    setDojoRoomLogFunded
 | 
			
		||||
} from "@/src/services/guildService";
 | 
			
		||||
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IDojoContributable, IGuildMemberDatabase } from "@/src/types/guildTypes";
 | 
			
		||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
} from "../../services/guildService";
 | 
			
		||||
import { addMiscItems, getInventory, updateCurrency } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { IDojoContributable, IGuildMemberDatabase } from "../../types/guildTypes";
 | 
			
		||||
import { IMiscItem } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportDojoRecipes, IDojoBuild } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,7 @@ import {
 | 
			
		||||
    GuildMember,
 | 
			
		||||
    TGuildDatabaseDocument,
 | 
			
		||||
    TGuildMemberDatabaseDocument
 | 
			
		||||
} from "@/src/models/guildModel";
 | 
			
		||||
} from "../../models/guildModel";
 | 
			
		||||
import {
 | 
			
		||||
    addGuildMemberMiscItemContribution,
 | 
			
		||||
    addGuildMemberShipDecoContribution,
 | 
			
		||||
@ -12,17 +12,17 @@ import {
 | 
			
		||||
    addVaultMiscItems,
 | 
			
		||||
    addVaultShipDecos,
 | 
			
		||||
    getGuildForRequestEx
 | 
			
		||||
} from "@/src/services/guildService";
 | 
			
		||||
} from "../../services/guildService";
 | 
			
		||||
import {
 | 
			
		||||
    addFusionTreasures,
 | 
			
		||||
    addMiscItems,
 | 
			
		||||
    addShipDecorations,
 | 
			
		||||
    getInventory,
 | 
			
		||||
    updateCurrency
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { ITypeCount } from "@/src/types/commonTypes";
 | 
			
		||||
import { IFusionTreasure, IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
} from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { ITypeCount } from "../../types/commonTypes";
 | 
			
		||||
import { IFusionTreasure, IMiscItem } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const contributeToVaultController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { getAllianceClient } from "@/src/services/guildService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { Alliance, AllianceMember, Guild, GuildMember } from "../../models/guildModel";
 | 
			
		||||
import { getAllianceClient } from "../../services/guildService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { GuildPermission } from "../../types/guildTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const createAllianceController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { Guild, GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { createUniqueClanName, getGuildClient, giveClanKey } from "@/src/services/guildService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { Guild, GuildMember } from "../../models/guildModel";
 | 
			
		||||
import { createUniqueClanName, getGuildClient, giveClanKey } from "../../services/guildService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
 | 
			
		||||
export const createGuildController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const account = await getAccountForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
 | 
			
		||||
export const creditsController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const inventory = (
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { ICrewMemberClient } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { ICrewMemberClient } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addMiscItems, freeUpSlot, getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { ICrewShipComponentFingerprint, InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { addMiscItems, freeUpSlot, getInventory, updateCurrency } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { IOid } from "../../types/commonTypes";
 | 
			
		||||
import { ICrewShipComponentFingerprint, InventorySlot } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportCustoms, ExportDojoRecipes } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -3,16 +3,16 @@ import {
 | 
			
		||||
    addCrewShipRawSalvage,
 | 
			
		||||
    getInventory,
 | 
			
		||||
    addEquipment
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
} from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ICrewShipComponentFingerprint, IInnateDamageFingerprint } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { ICrewShipComponentFingerprint, IInnateDamageFingerprint } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { ExportCustoms, ExportRailjackWeapons, ExportUpgrades } from "warframe-public-export-plus";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { getRandomInt } from "@/src/services/rngService";
 | 
			
		||||
import { IFingerprintStat } from "@/src/helpers/rivenHelper";
 | 
			
		||||
import { IEquipmentDatabase } from "@/src/types/equipmentTypes";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { getRandomInt } from "../../services/rngService";
 | 
			
		||||
import { IFingerprintStat } from "../../helpers/rivenHelper";
 | 
			
		||||
import { IEquipmentDatabase } from "../../types/equipmentTypes";
 | 
			
		||||
 | 
			
		||||
export const crewShipIdentifySalvageController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { Guild } from "@/src/models/guildModel";
 | 
			
		||||
import { hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountForRequest, getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { Guild } from "../../models/guildModel";
 | 
			
		||||
import { hasAccessToDojo, hasGuildPermission } from "../../services/guildService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountForRequest, getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { GuildPermission } from "../../types/guildTypes";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const customObstacleCourseLeaderboardController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { getGuildForRequest, hasGuildPermission } from "@/src/services/guildService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { GuildPermission, IGuildRank } from "@/src/types/guildTypes";
 | 
			
		||||
import { getGuildForRequest, hasGuildPermission } from "../../services/guildService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { GuildPermission, IGuildRank } from "../../types/guildTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const customizeGuildRanksController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { AllianceMember, GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { AllianceMember, GuildMember } from "../../models/guildModel";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const declineAllianceInviteController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { GuildMember } from "../../models/guildModel";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const declineGuildInviteController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { deleteSession } from "@/src/managers/sessionManager";
 | 
			
		||||
import { deleteSession } from "../../managers/sessionManager";
 | 
			
		||||
 | 
			
		||||
const deleteSessionController: RequestHandler = (_req, res) => {
 | 
			
		||||
    deleteSession(_req.query.sessionId as string);
 | 
			
		||||
 | 
			
		||||
@ -5,11 +5,11 @@ import {
 | 
			
		||||
    hasGuildPermission,
 | 
			
		||||
    refundDojoDeco,
 | 
			
		||||
    removeDojoDeco
 | 
			
		||||
} from "@/src/services/guildService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
} from "../../services/guildService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { GuildPermission } from "../../types/guildTypes";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const destroyDojoDecoController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
			
		||||
import { parallelForeach } from "@/src/utils/async-utils";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { Alliance, AllianceMember, Guild, GuildMember } from "../../models/guildModel";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService";
 | 
			
		||||
import { GuildPermission } from "../../types/guildTypes";
 | 
			
		||||
import { parallelForeach } from "../../utils/async-utils";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const divvyAllianceVaultController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { GuildMember, TGuildDatabaseDocument } from "@/src/models/guildModel";
 | 
			
		||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, scaleRequiredCount } from "@/src/services/guildService";
 | 
			
		||||
import { getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IDojoContributable } from "@/src/types/guildTypes";
 | 
			
		||||
import { GuildMember, TGuildDatabaseDocument } from "../../models/guildModel";
 | 
			
		||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, scaleRequiredCount } from "../../services/guildService";
 | 
			
		||||
import { getInventory, updateCurrency } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { IDojoContributable } from "../../types/guildTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportDojoRecipes, IDojoBuild } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,11 @@
 | 
			
		||||
import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { fromStoreItem } from "@/src/services/itemDataService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getRandomInt, getRandomWeightedRewardUc } from "@/src/services/rngService";
 | 
			
		||||
import { IMongoDate, IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { IDroneClient } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { toMongoDate, toOid } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { addMiscItems, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { fromStoreItem } from "../../services/itemDataService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { getRandomInt, getRandomWeightedRewardUc } from "../../services/rngService";
 | 
			
		||||
import { IMongoDate, IOid } from "../../types/commonTypes";
 | 
			
		||||
import { IDroneClient } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportDrones, ExportResources, ExportSystems } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,13 +1,13 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { combineInventoryChanges, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { IEndlessXpReward, IInventoryClient, TEndlessXpCategory } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { combineInventoryChanges, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { IEndlessXpReward, IInventoryClient, TEndlessXpCategory } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { ExportRewards, ICountedStoreItem } from "warframe-public-export-plus";
 | 
			
		||||
import { getRandomElement } from "@/src/services/rngService";
 | 
			
		||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { getRandomElement } from "../../services/rngService";
 | 
			
		||||
import { handleStoreItemAcquisition } from "../../services/purchaseService";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
 | 
			
		||||
export const endlessXpController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { toMongoDate } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getInventory, updateEntratiVault } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { toMongoDate } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { getInventory, updateEntratiVault } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const entratiLabConquestModeController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getRecipe, WeaponTypeInternal } from "@/src/services/itemDataService";
 | 
			
		||||
import { EquipmentFeatures } from "@/src/types/equipmentTypes";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { addMiscItems, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { getRecipe, WeaponTypeInternal } from "../../services/itemDataService";
 | 
			
		||||
import { EquipmentFeatures } from "../../types/equipmentTypes";
 | 
			
		||||
 | 
			
		||||
export const evolveWeaponController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getSession } from "@/src/managers/sessionManager";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { IFindSessionRequest } from "@/src/types/session";
 | 
			
		||||
import { getSession } from "../../managers/sessionManager";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { IFindSessionRequest } from "../../types/session";
 | 
			
		||||
 | 
			
		||||
export const findSessionsController: RequestHandler = (_req, res) => {
 | 
			
		||||
    const req = JSON.parse(String(_req.body)) as IFindSessionRequest;
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addMiscItems, addStanding, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { addMiscItems, addStanding, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { IMiscItem } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportResources } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory, addMiscItems, addEquipment, occupySlot } from "@/src/services/inventoryService";
 | 
			
		||||
import { IMiscItem, TFocusPolarity, TEquipmentKey, InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { getInventory, addMiscItems, addEquipment, occupySlot } from "../../services/inventoryService";
 | 
			
		||||
import { IMiscItem, TFocusPolarity, TEquipmentKey, InventorySlot } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { ExportFocusUpgrades } from "warframe-public-export-plus";
 | 
			
		||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import { Inventory } from "../../models/inventoryModels/inventoryModel";
 | 
			
		||||
 | 
			
		||||
export const focusController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportResources } from "warframe-public-export-plus";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { addFusionTreasures, addMiscItems, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { parseFusionTreasure } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { addFusionTreasures, addMiscItems, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { IMiscItem } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { parseFusionTreasure } from "../../helpers/inventoryHelpers";
 | 
			
		||||
 | 
			
		||||
interface IFusionTreasureRequest {
 | 
			
		||||
    oldTreasureName: string;
 | 
			
		||||
 | 
			
		||||
@ -1,13 +1,13 @@
 | 
			
		||||
import { toMongoDate } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addMiscItem, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { toStoreItem } from "@/src/services/itemDataService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { createGarden, getPersonalRooms } from "@/src/services/personalRoomsService";
 | 
			
		||||
import { IMongoDate } from "@/src/types/commonTypes";
 | 
			
		||||
import { IMissionReward } from "@/src/types/missionTypes";
 | 
			
		||||
import { IGardeningClient, IPersonalRoomsClient } from "@/src/types/personalRoomsTypes";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { toMongoDate } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { addMiscItem, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { toStoreItem } from "../../services/itemDataService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { createGarden, getPersonalRooms } from "../../services/personalRoomsService";
 | 
			
		||||
import { IMongoDate } from "../../types/commonTypes";
 | 
			
		||||
import { IMissionReward } from "../../types/missionTypes";
 | 
			
		||||
import { IGardeningClient, IPersonalRoomsClient } from "../../types/personalRoomsTypes";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { dict_en, ExportResources } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { updateGeneric } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { updateGeneric } from "../../services/inventoryService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { IGenericUpdate } from "@/src/types/genericUpdate";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { IGenericUpdate } from "../../types/genericUpdate";
 | 
			
		||||
 | 
			
		||||
// This endpoint used to be /api/genericUpdate.php, but sometime around the Jade Shadows update, it was changed to /api/updateNodeIntros.php.
 | 
			
		||||
// SpaceNinjaServer supports both endpoints right now.
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { Alliance, Guild } from "@/src/models/guildModel";
 | 
			
		||||
import { getAllianceClient } from "@/src/services/guildService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { Alliance, Guild } from "../../models/guildModel";
 | 
			
		||||
import { getAllianceClient } from "../../services/guildService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const getAllianceController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import { DailyDeal } from "@/src/models/worldStateModel";
 | 
			
		||||
import { DailyDeal } from "../../models/worldStateModel";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const getDailyDealStockLevelsController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { Friendship } from "@/src/models/friendModel";
 | 
			
		||||
import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "@/src/services/friendService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IFriendInfo } from "@/src/types/friendTypes";
 | 
			
		||||
import { toOid } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { Friendship } from "../../models/friendModel";
 | 
			
		||||
import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "../../services/friendService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { IFriendInfo } from "../../types/friendTypes";
 | 
			
		||||
import { Request, RequestHandler, Response } from "express";
 | 
			
		||||
 | 
			
		||||
// POST with {} instead of GET as of 38.5.0
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IGuildMemberClient } from "@/src/types/guildTypes";
 | 
			
		||||
import { GuildMember } from "../../models/guildModel";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { IGuildMemberClient } from "../../types/guildTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const getGuildContributionsController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { Guild } from "@/src/models/guildModel";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { createUniqueClanName, getGuildClient } from "@/src/services/guildService";
 | 
			
		||||
import { Guild } from "../../models/guildModel";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { createUniqueClanName, getGuildClient } from "../../services/guildService";
 | 
			
		||||
 | 
			
		||||
export const getGuildController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const account = await getAccountForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
import { Guild } from "@/src/models/guildModel";
 | 
			
		||||
import { getDojoClient } from "@/src/services/guildService";
 | 
			
		||||
import { Account } from "@/src/models/loginModel";
 | 
			
		||||
import { Guild } from "../../models/guildModel";
 | 
			
		||||
import { getDojoClient } from "../../services/guildService";
 | 
			
		||||
import { Account } from "../../models/loginModel";
 | 
			
		||||
 | 
			
		||||
export const getGuildDojoController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const guildId = req.query.guildId as string;
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { Guild } from "@/src/models/guildModel";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { Guild } from "../../models/guildModel";
 | 
			
		||||
 | 
			
		||||
export const getGuildEventScoreController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const account = await getAccountForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { toMongoDate } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { Guild } from "@/src/models/guildModel";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IMongoDate } from "@/src/types/commonTypes";
 | 
			
		||||
import { toMongoDate } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { Guild } from "../../models/guildModel";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { IMongoDate } from "../../types/commonTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const getGuildLogController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { Account, Ignore } from "@/src/models/loginModel";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IFriendInfo } from "@/src/types/friendTypes";
 | 
			
		||||
import { parallelForeach } from "@/src/utils/async-utils";
 | 
			
		||||
import { toOid } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { Account, Ignore } from "../../models/loginModel";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { IFriendInfo } from "../../types/friendTypes";
 | 
			
		||||
import { parallelForeach } from "../../utils/async-utils";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const getIgnoredUsersController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { generateRewardSeed } from "@/src/services/rngService";
 | 
			
		||||
import { Inventory } from "../../models/inventoryModels/inventoryModel";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { generateRewardSeed } from "../../services/rngService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const getNewRewardSeedController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { EPOCH, getSeasonChallengePools, getWorldState, pushWeeklyActs } from "@/src/services/worldStateService";
 | 
			
		||||
import { unixTimesInMs } from "@/src/constants/timeConstants";
 | 
			
		||||
import { ISeasonChallenge } from "@/src/types/worldStateTypes";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { EPOCH, getSeasonChallengePools, getWorldState, pushWeeklyActs } from "../../services/worldStateService";
 | 
			
		||||
import { unixTimesInMs } from "../../constants/timeConstants";
 | 
			
		||||
import { ISeasonChallenge } from "../../types/worldStateTypes";
 | 
			
		||||
import { ExportChallenges } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
export const getPastWeeklyChallengesController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,11 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
import allShipFeatures from "@/static/fixed_responses/allShipFeatures.json";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { createGarden, getPersonalRooms } from "@/src/services/personalRoomsService";
 | 
			
		||||
import { IGetShipResponse, IPersonalRoomsClient } from "@/src/types/personalRoomsTypes";
 | 
			
		||||
import { getLoadout } from "@/src/services/loadoutService";
 | 
			
		||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { config } from "../../services/configService";
 | 
			
		||||
import allShipFeatures from "../../../static/fixed_responses/allShipFeatures.json";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { createGarden, getPersonalRooms } from "../../services/personalRoomsService";
 | 
			
		||||
import { IGetShipResponse, IPersonalRoomsClient } from "../../types/personalRoomsTypes";
 | 
			
		||||
import { getLoadout } from "../../services/loadoutService";
 | 
			
		||||
import { toOid } from "../../helpers/inventoryHelpers";
 | 
			
		||||
 | 
			
		||||
export const getShipController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { applyStandingToVendorManifest, getVendorManifestByTypeName } from "@/src/services/serversideVendorsService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
import { applyStandingToVendorManifest, getVendorManifestByTypeName } from "../../services/serversideVendorsService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { config } from "../../services/configService";
 | 
			
		||||
 | 
			
		||||
export const getVendorInfoController: RequestHandler = async (req, res) => {
 | 
			
		||||
    let manifest = getVendorManifestByTypeName(req.query.vendor as string);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { crackRelic } from "@/src/helpers/relicHelper";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IVoidTearParticipantInfo } from "@/src/types/requestTypes";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { crackRelic } from "../../helpers/relicHelper";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { IVoidTearParticipantInfo } from "../../types/requestTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const getVoidProjectionRewardsController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,17 +1,17 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { Account } from "@/src/models/loginModel";
 | 
			
		||||
import { areFriends } from "@/src/services/friendService";
 | 
			
		||||
import { createMessage } from "@/src/services/inboxService";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { Account } from "../../models/loginModel";
 | 
			
		||||
import { areFriends } from "../../services/friendService";
 | 
			
		||||
import { createMessage } from "../../services/inboxService";
 | 
			
		||||
import {
 | 
			
		||||
    combineInventoryChanges,
 | 
			
		||||
    getEffectiveAvatarImageType,
 | 
			
		||||
    getInventory,
 | 
			
		||||
    updateCurrency
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService";
 | 
			
		||||
import { handleDailyDealPurchase, handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { IPurchaseParams, IPurchaseResponse, PurchaseSource } from "@/src/types/purchaseTypes";
 | 
			
		||||
} from "../../services/inventoryService";
 | 
			
		||||
import { getAccountForRequest, getSuffixedName } from "../../services/loginService";
 | 
			
		||||
import { handleDailyDealPurchase, handleStoreItemAcquisition } from "../../services/purchaseService";
 | 
			
		||||
import { IOid } from "../../types/commonTypes";
 | 
			
		||||
import { IPurchaseParams, IPurchaseResponse, PurchaseSource } from "../../types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportBundles, ExportFlavour } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,13 +1,13 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { sendWsBroadcastTo } from "../../services/wsService";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { addMiscItems, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { ArtifactPolarity } from "../../types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { ExportRecipes } from "warframe-public-export-plus";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { EquipmentFeatures, IEquipmentClient } from "@/src/types/equipmentTypes";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { EquipmentFeatures, IEquipmentClient } from "../../types/equipmentTypes";
 | 
			
		||||
 | 
			
		||||
interface IGildWeaponRequest {
 | 
			
		||||
    ItemName: string;
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { parseString } from "@/src/helpers/general";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { giveKeyChainItem } from "@/src/services/questService";
 | 
			
		||||
import { IKeyChainRequest } from "@/src/types/requestTypes";
 | 
			
		||||
import { parseString } from "../../helpers/general";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { giveKeyChainItem } from "../../services/questService";
 | 
			
		||||
import { IKeyChainRequest } from "../../types/requestTypes";
 | 
			
		||||
 | 
			
		||||
export const giveKeyChainTriggeredItemsController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = parseString(req.query.accountId);
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { giveKeyChainMessage } from "@/src/services/questService";
 | 
			
		||||
import { IKeyChainRequest } from "@/src/types/requestTypes";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { giveKeyChainMessage } from "../../services/questService";
 | 
			
		||||
import { IKeyChainRequest } from "../../types/requestTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const giveKeyChainTriggeredMessageController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addItem, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { addItem, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { IOid } from "../../types/commonTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const giveQuestKeyRewardController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addLoreFragmentScans, addShipDecorations, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { ITypeCount } from "@/src/types/commonTypes";
 | 
			
		||||
import { ILoreFragmentScan } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { addLoreFragmentScans, addShipDecorations, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { ITypeCount } from "../../types/commonTypes";
 | 
			
		||||
import { ILoreFragmentScan } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const giveShipDecoAndLoreFragmentController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addStartingGear, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { TPartialStartingGear } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { addStartingGear, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { TPartialStartingGear } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const giveStartingGearController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -11,9 +11,9 @@ import {
 | 
			
		||||
    removePigmentsFromGuildMembers,
 | 
			
		||||
    scaleRequiredCount,
 | 
			
		||||
    setGuildTechLogState
 | 
			
		||||
} from "@/src/services/guildService";
 | 
			
		||||
} from "../../services/guildService";
 | 
			
		||||
import { ExportDojoRecipes, ExportRailjackWeapons } from "warframe-public-export-plus";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import {
 | 
			
		||||
    addCrewShipWeaponSkin,
 | 
			
		||||
    addEquipment,
 | 
			
		||||
@ -24,15 +24,15 @@ import {
 | 
			
		||||
    getInventory,
 | 
			
		||||
    occupySlot,
 | 
			
		||||
    updateCurrency
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { IMiscItem, InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
import { GuildPermission, ITechProjectClient } from "@/src/types/guildTypes";
 | 
			
		||||
import { GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
} from "../../services/inventoryService";
 | 
			
		||||
import { IMiscItem, InventorySlot } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { config } from "../../services/configService";
 | 
			
		||||
import { GuildPermission, ITechProjectClient } from "../../types/guildTypes";
 | 
			
		||||
import { GuildMember } from "../../models/guildModel";
 | 
			
		||||
import { toMongoDate, toOid } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel";
 | 
			
		||||
 | 
			
		||||
export const guildTechController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { createNewSession } from "@/src/managers/sessionManager";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { ISession } from "@/src/types/session";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService";
 | 
			
		||||
import { createNewSession } from "../../managers/sessionManager";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { ISession } from "../../types/session";
 | 
			
		||||
import { JSONParse } from "json-with-bigint";
 | 
			
		||||
import { toOid2, version_compare } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { toOid2, version_compare } from "../../helpers/inventoryHelpers";
 | 
			
		||||
 | 
			
		||||
const hostSessionController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const account = await getAccountForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addBooster, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getRandomInt } from "@/src/services/rngService";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { addBooster, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { getRandomInt } from "../../services/rngService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportBoosters } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { Inbox } from "@/src/models/inboxModel";
 | 
			
		||||
import { Inbox } from "../../models/inboxModel";
 | 
			
		||||
import {
 | 
			
		||||
    createMessage,
 | 
			
		||||
    createNewEventMessages,
 | 
			
		||||
@ -7,20 +7,20 @@ import {
 | 
			
		||||
    deleteMessageRead,
 | 
			
		||||
    getAllMessagesSorted,
 | 
			
		||||
    getMessage
 | 
			
		||||
} from "@/src/services/inboxService";
 | 
			
		||||
import { getAccountForRequest, getAccountFromSuffixedName, getSuffixedName } from "@/src/services/loginService";
 | 
			
		||||
} from "../../services/inboxService";
 | 
			
		||||
import { getAccountForRequest, getAccountFromSuffixedName, getSuffixedName } from "../../services/loginService";
 | 
			
		||||
import {
 | 
			
		||||
    addItems,
 | 
			
		||||
    combineInventoryChanges,
 | 
			
		||||
    getEffectiveAvatarImageType,
 | 
			
		||||
    getInventory,
 | 
			
		||||
    updateCurrency
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
} from "../../services/inventoryService";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { ExportFlavour } from "warframe-public-export-plus";
 | 
			
		||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
			
		||||
import { fromStoreItem, isStoreItem } from "@/src/services/itemDataService";
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { handleStoreItemAcquisition } from "../../services/purchaseService";
 | 
			
		||||
import { fromStoreItem, isStoreItem } from "../../services/itemDataService";
 | 
			
		||||
import { IOid } from "../../types/commonTypes";
 | 
			
		||||
 | 
			
		||||
export const inboxController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const { deleteId, lastMessage: latestClientMessageId, messageId } = req.query;
 | 
			
		||||
 | 
			
		||||
@ -1,25 +1,25 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getInventory, addMiscItems, updateCurrency, addRecipes, freeUpSlot } from "@/src/services/inventoryService";
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { getInventory, addMiscItems, updateCurrency, addRecipes, freeUpSlot } from "../../services/inventoryService";
 | 
			
		||||
import { IOid } from "../../types/commonTypes";
 | 
			
		||||
import {
 | 
			
		||||
    IConsumedSuit,
 | 
			
		||||
    IHelminthFoodRecord,
 | 
			
		||||
    IInventoryClient,
 | 
			
		||||
    IMiscItem,
 | 
			
		||||
    InventorySlot
 | 
			
		||||
} from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
} from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { ExportMisc } from "warframe-public-export-plus";
 | 
			
		||||
import { getRecipe } from "@/src/services/itemDataService";
 | 
			
		||||
import { toMongoDate, version_compare } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { colorToShard } from "@/src/helpers/shardHelper";
 | 
			
		||||
import { getRecipe } from "../../services/itemDataService";
 | 
			
		||||
import { toMongoDate, version_compare } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { colorToShard } from "../../helpers/shardHelper";
 | 
			
		||||
import {
 | 
			
		||||
    addInfestedFoundryXP,
 | 
			
		||||
    applyCheatsToInfestedFoundry,
 | 
			
		||||
    handleSubsumeCompletion
 | 
			
		||||
} from "@/src/services/infestedFoundryService";
 | 
			
		||||
} from "../../services/infestedFoundryService";
 | 
			
		||||
 | 
			
		||||
export const infestedFoundryController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const account = await getAccountForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,11 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { Inventory, TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
import allDialogue from "@/static/fixed_responses/allDialogue.json";
 | 
			
		||||
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
 | 
			
		||||
import { IInventoryClient, IShipInventory, equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IPolarity, ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService";
 | 
			
		||||
import { Inventory, TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel";
 | 
			
		||||
import { config } from "../../services/configService";
 | 
			
		||||
import allDialogue from "../../../static/fixed_responses/allDialogue.json";
 | 
			
		||||
import { ILoadoutDatabase } from "../../types/saveLoadoutTypes";
 | 
			
		||||
import { IInventoryClient, IShipInventory, equipmentKeys } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IPolarity, ArtifactPolarity } from "../../types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import {
 | 
			
		||||
    eFaction,
 | 
			
		||||
    ExportCustoms,
 | 
			
		||||
@ -14,7 +14,7 @@ import {
 | 
			
		||||
    ExportVirtuals,
 | 
			
		||||
    ICountedItem
 | 
			
		||||
} from "warframe-public-export-plus";
 | 
			
		||||
import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "@/src/services/infestedFoundryService";
 | 
			
		||||
import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "../../services/infestedFoundryService";
 | 
			
		||||
import {
 | 
			
		||||
    addEmailItem,
 | 
			
		||||
    addItem,
 | 
			
		||||
@ -24,22 +24,22 @@ import {
 | 
			
		||||
    cleanupInventory,
 | 
			
		||||
    createLibraryDailyTask,
 | 
			
		||||
    getCalendarProgress
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { addString, catBreadHash } from "@/src/helpers/stringHelpers";
 | 
			
		||||
} from "../../services/inventoryService";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { addString, catBreadHash } from "../../helpers/stringHelpers";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
import { getNemesisManifest } from "@/src/helpers/nemesisHelpers";
 | 
			
		||||
import { getPersonalRooms } from "@/src/services/personalRoomsService";
 | 
			
		||||
import { IPersonalRoomsClient } from "@/src/types/personalRoomsTypes";
 | 
			
		||||
import { Ship } from "@/src/models/shipModel";
 | 
			
		||||
import { toLegacyOid, toOid, version_compare } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { Inbox } from "@/src/models/inboxModel";
 | 
			
		||||
import { unixTimesInMs } from "@/src/constants/timeConstants";
 | 
			
		||||
import { DailyDeal } from "@/src/models/worldStateModel";
 | 
			
		||||
import { EquipmentFeatures } from "@/src/types/equipmentTypes";
 | 
			
		||||
import { generateRewardSeed } from "@/src/services/rngService";
 | 
			
		||||
import { getInvasionByOid, getWorldState } from "@/src/services/worldStateService";
 | 
			
		||||
import { createMessage } from "@/src/services/inboxService";
 | 
			
		||||
import { getNemesisManifest } from "../../helpers/nemesisHelpers";
 | 
			
		||||
import { getPersonalRooms } from "../../services/personalRoomsService";
 | 
			
		||||
import { IPersonalRoomsClient } from "../../types/personalRoomsTypes";
 | 
			
		||||
import { Ship } from "../../models/shipModel";
 | 
			
		||||
import { toLegacyOid, toOid, version_compare } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { Inbox } from "../../models/inboxModel";
 | 
			
		||||
import { unixTimesInMs } from "../../constants/timeConstants";
 | 
			
		||||
import { DailyDeal } from "../../models/worldStateModel";
 | 
			
		||||
import { EquipmentFeatures } from "../../types/equipmentTypes";
 | 
			
		||||
import { generateRewardSeed } from "../../services/rngService";
 | 
			
		||||
import { getInvasionByOid, getWorldState } from "../../services/worldStateService";
 | 
			
		||||
import { createMessage } from "../../services/inboxService";
 | 
			
		||||
 | 
			
		||||
export const inventoryController: RequestHandler = async (request, response) => {
 | 
			
		||||
    const account = await getAccountForRequest(request);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory, updateCurrency, updateSlots } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { getInventory, updateCurrency, updateSlots } from "../../services/inventoryService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { exhaustive } from "@/src/utils/ts-utils";
 | 
			
		||||
import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { exhaustive } from "../../utils/ts-utils";
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
    loadout slots are additionally purchased slots only
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getSessionByID } from "@/src/managers/sessionManager";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { getSessionByID } from "../../managers/sessionManager";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
 | 
			
		||||
export const joinSessionController: RequestHandler = (req, res) => {
 | 
			
		||||
    const reqBody = JSON.parse(String(req.body)) as IJoinSessionRequest;
 | 
			
		||||
 | 
			
		||||
@ -1,14 +1,14 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
import { buildConfig } from "@/src/services/buildConfigService";
 | 
			
		||||
import { config } from "../../services/configService";
 | 
			
		||||
import { buildConfig } from "../../services/buildConfigService";
 | 
			
		||||
 | 
			
		||||
import { Account } from "@/src/models/loginModel";
 | 
			
		||||
import { createAccount, createNonce, getUsernameFromEmail, isCorrectPassword } from "@/src/services/loginService";
 | 
			
		||||
import { IDatabaseAccountJson, ILoginRequest, ILoginResponse } from "@/src/types/loginTypes";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { version_compare } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
			
		||||
import { Account } from "../../models/loginModel";
 | 
			
		||||
import { createAccount, createNonce, getUsernameFromEmail, isCorrectPassword } from "../../services/loginService";
 | 
			
		||||
import { IDatabaseAccountJson, ILoginRequest, ILoginResponse } from "../../types/loginTypes";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { version_compare } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { sendWsBroadcastTo } from "../../services/wsService";
 | 
			
		||||
 | 
			
		||||
export const loginController: RequestHandler = async (request, response) => {
 | 
			
		||||
    const loginRequest = JSON.parse(String(request.body)) as ILoginRequest; // parse octet stream of json data to json object
 | 
			
		||||
 | 
			
		||||
@ -1,15 +1,15 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService";
 | 
			
		||||
import {
 | 
			
		||||
    claimLoginReward,
 | 
			
		||||
    getRandomLoginRewards,
 | 
			
		||||
    ILoginRewardsReponse,
 | 
			
		||||
    isLoginRewardAChoice,
 | 
			
		||||
    setAccountGotLoginRewardToday
 | 
			
		||||
} from "@/src/services/loginRewardService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
			
		||||
} from "../../services/loginRewardService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { config } from "../../services/configService";
 | 
			
		||||
import { sendWsBroadcastTo } from "../../services/wsService";
 | 
			
		||||
 | 
			
		||||
export const loginRewardsController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const account = await getAccountForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,14 +1,14 @@
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import {
 | 
			
		||||
    claimLoginReward,
 | 
			
		||||
    getRandomLoginRewards,
 | 
			
		||||
    setAccountGotLoginRewardToday
 | 
			
		||||
} from "@/src/services/loginRewardService";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
			
		||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
} from "../../services/loginRewardService";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService";
 | 
			
		||||
import { handleStoreItemAcquisition } from "../../services/purchaseService";
 | 
			
		||||
import { sendWsBroadcastTo } from "../../services/wsService";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const loginRewardsSelectionController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { Account } from "@/src/models/loginModel";
 | 
			
		||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
			
		||||
import { Account } from "../../models/loginModel";
 | 
			
		||||
import { sendWsBroadcastTo } from "../../services/wsService";
 | 
			
		||||
 | 
			
		||||
export const logoutController: RequestHandler = async (req, res) => {
 | 
			
		||||
    if (!req.query.accountId) {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const maturePetController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,18 +1,18 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IMissionInventoryUpdateRequest } from "@/src/types/requestTypes";
 | 
			
		||||
import { addMissionInventoryUpdates, addMissionRewards } from "@/src/services/missionInventoryUpdateService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getInventoryResponse } from "@/src/controllers/api/inventoryController";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService";
 | 
			
		||||
import { IMissionInventoryUpdateRequest } from "../../types/requestTypes";
 | 
			
		||||
import { addMissionInventoryUpdates, addMissionRewards } from "../../services/missionInventoryUpdateService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getInventoryResponse } from "./inventoryController";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import {
 | 
			
		||||
    IMissionInventoryUpdateResponse,
 | 
			
		||||
    IMissionInventoryUpdateResponseBackToDryDock,
 | 
			
		||||
    IMissionInventoryUpdateResponseRailjackInterstitial
 | 
			
		||||
} from "@/src/types/missionTypes";
 | 
			
		||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
			
		||||
import { generateRewardSeed } from "@/src/services/rngService";
 | 
			
		||||
} from "../../types/missionTypes";
 | 
			
		||||
import { sendWsBroadcastTo } from "../../services/wsService";
 | 
			
		||||
import { generateRewardSeed } from "../../services/rngService";
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
**** INPUT ****
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { sendWsBroadcastTo } from "../../services/wsService";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import {
 | 
			
		||||
    getInventory,
 | 
			
		||||
    updateCurrency,
 | 
			
		||||
@ -12,13 +12,13 @@ import {
 | 
			
		||||
    productCategoryToInventoryBin,
 | 
			
		||||
    combineInventoryChanges,
 | 
			
		||||
    addSpecialItem
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { getDefaultUpgrades } from "@/src/services/itemDataService";
 | 
			
		||||
import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper";
 | 
			
		||||
import { getRandomInt } from "@/src/services/rngService";
 | 
			
		||||
} from "../../services/inventoryService";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { getDefaultUpgrades } from "../../services/itemDataService";
 | 
			
		||||
import { modularWeaponTypes } from "../../helpers/modularWeaponHelper";
 | 
			
		||||
import { getRandomInt } from "../../services/rngService";
 | 
			
		||||
import { ExportSentinels, ExportWeapons, IDefaultUpgrade } from "warframe-public-export-plus";
 | 
			
		||||
import { IEquipmentDatabase, Status } from "@/src/types/equipmentTypes";
 | 
			
		||||
import { IEquipmentDatabase, Status } from "../../types/equipmentTypes";
 | 
			
		||||
 | 
			
		||||
interface IModularCraftRequest {
 | 
			
		||||
    WeaponType: string;
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportWeapons } from "warframe-public-export-plus";
 | 
			
		||||
import { IMongoDate } from "@/src/types/commonTypes";
 | 
			
		||||
import { toMongoDate } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { SRng } from "@/src/services/rngService";
 | 
			
		||||
import { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { IMongoDate } from "../../types/commonTypes";
 | 
			
		||||
import { toMongoDate } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import { SRng } from "../../services/rngService";
 | 
			
		||||
import { ArtifactPolarity } from "../../types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import {
 | 
			
		||||
    addEquipment,
 | 
			
		||||
    applyDefaultUpgrades,
 | 
			
		||||
@ -12,13 +12,13 @@ import {
 | 
			
		||||
    occupySlot,
 | 
			
		||||
    productCategoryToInventoryBin,
 | 
			
		||||
    updateCurrency
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { getDefaultUpgrades } from "@/src/services/itemDataService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
			
		||||
import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { EquipmentFeatures } from "@/src/types/equipmentTypes";
 | 
			
		||||
} from "../../services/inventoryService";
 | 
			
		||||
import { getDefaultUpgrades } from "../../services/itemDataService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { sendWsBroadcastTo } from "../../services/wsService";
 | 
			
		||||
import { modularWeaponTypes } from "../../helpers/modularWeaponHelper";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { EquipmentFeatures } from "../../types/equipmentTypes";
 | 
			
		||||
 | 
			
		||||
export const modularWeaponSaleController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const partTypeToParts: Record<string, string[]> = {};
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { sendWsBroadcastTo } from "@/src/services/wsService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { getInventory, updateCurrency } from "../../services/inventoryService";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { sendWsBroadcastTo } from "../../services/wsService";
 | 
			
		||||
 | 
			
		||||
interface INameWeaponRequest {
 | 
			
		||||
    ItemName: string;
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import { fromDbOid, version_compare } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { fromDbOid, version_compare } from "../../helpers/inventoryHelpers";
 | 
			
		||||
import {
 | 
			
		||||
    antivirusMods,
 | 
			
		||||
    decodeNemesisGuess,
 | 
			
		||||
@ -14,15 +14,15 @@ import {
 | 
			
		||||
    GUESS_WILDCARD,
 | 
			
		||||
    IKnifeResponse,
 | 
			
		||||
    parseUpgrade
 | 
			
		||||
} from "@/src/helpers/nemesisHelpers";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import { Loadout } from "@/src/models/inventoryModels/loadoutModel";
 | 
			
		||||
import { addMods, freeUpSlot, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { SRng } from "@/src/services/rngService";
 | 
			
		||||
import { IMongoDate, IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { IEquipmentClient } from "@/src/types/equipmentTypes";
 | 
			
		||||
} from "../../helpers/nemesisHelpers";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel";
 | 
			
		||||
import { Loadout } from "../../models/inventoryModels/loadoutModel";
 | 
			
		||||
import { addMods, freeUpSlot, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService";
 | 
			
		||||
import { SRng } from "../../services/rngService";
 | 
			
		||||
import { IMongoDate, IOid } from "../../types/commonTypes";
 | 
			
		||||
import { IEquipmentClient } from "../../types/equipmentTypes";
 | 
			
		||||
import {
 | 
			
		||||
    IInnateDamageFingerprint,
 | 
			
		||||
    IInventoryClient,
 | 
			
		||||
@ -33,8 +33,8 @@ import {
 | 
			
		||||
    LoadoutIndex,
 | 
			
		||||
    TEquipmentKey,
 | 
			
		||||
    TNemesisFaction
 | 
			
		||||
} from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
} from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { logger } from "../../utils/logger";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -6,14 +6,14 @@ import {
 | 
			
		||||
    hasGuildPermission,
 | 
			
		||||
    processDojoBuildMaterialsGathered,
 | 
			
		||||
    scaleRequiredCount
 | 
			
		||||
} from "@/src/services/guildService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
			
		||||
} from "../../services/guildService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { GuildPermission } from "../../types/guildTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
import { ExportDojoRecipes, ExportResources } from "warframe-public-export-plus";
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
import { config } from "../../services/configService";
 | 
			
		||||
 | 
			
		||||
export const placeDecoInComponentController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { Inventory } from "../../models/inventoryModels/inventoryModel";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const playedParkourTutorialController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addConsumables, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IPlayerSkills } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { addConsumables, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { IPlayerSkills } from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IInventoryChanges } from "../../types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const playerSkillsController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,17 +1,17 @@
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { GuildAd, GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers";
 | 
			
		||||
import { GuildAd, GuildMember } from "../../models/guildModel";
 | 
			
		||||
import {
 | 
			
		||||
    addGuildMemberMiscItemContribution,
 | 
			
		||||
    addVaultMiscItems,
 | 
			
		||||
    getGuildForRequestEx,
 | 
			
		||||
    getVaultMiscItemCount,
 | 
			
		||||
    hasGuildPermissionEx
 | 
			
		||||
} from "@/src/services/guildService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getVendorManifestByTypeName } from "@/src/services/serversideVendorsService";
 | 
			
		||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
			
		||||
import { IPurchaseParams } from "@/src/types/purchaseTypes";
 | 
			
		||||
} from "../../services/guildService";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { getVendorManifestByTypeName } from "../../services/serversideVendorsService";
 | 
			
		||||
import { GuildPermission } from "../../types/guildTypes";
 | 
			
		||||
import { IPurchaseParams } from "../../types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const postGuildAdvertisementController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService";
 | 
			
		||||
import { addMiscItems, getInventory } from "../../services/inventoryService";
 | 
			
		||||
import { ExportRelics, IRelic } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
export const projectionManagerController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user