diff --git a/src/controllers/api/addFriendImageController.ts b/src/controllers/api/addFriendImageController.ts index 979bb9fb1..6c9a23708 100644 --- a/src/controllers/api/addFriendImageController.ts +++ b/src/controllers/api/addFriendImageController.ts @@ -4,6 +4,7 @@ import { IUpdateGlyphRequest } from "@/src/types/requestTypes"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory } from "@/src/services/inventoryService"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises const addFriendImageController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const json = getJSONfromString(req.body.toString()) as IUpdateGlyphRequest; diff --git a/src/controllers/api/createGuildController.ts b/src/controllers/api/createGuildController.ts index f0f56f1b2..9499e3084 100644 --- a/src/controllers/api/createGuildController.ts +++ b/src/controllers/api/createGuildController.ts @@ -5,6 +5,7 @@ import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; import { Guild } from "@/src/models/guildModel"; import { ICreateGuildRequest } from "@/src/types/guildTypes"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises const createGuildController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const payload: ICreateGuildRequest = getJSONfromString(req.body.toString()); diff --git a/src/controllers/api/focusController.ts b/src/controllers/api/focusController.ts index b2ac53f6f..e13b60578 100644 --- a/src/controllers/api/focusController.ts +++ b/src/controllers/api/focusController.ts @@ -5,6 +5,7 @@ import { IMiscItem, TFocusPolarity } from "@/src/types/inventoryTypes/inventoryT import { logger } from "@/src/utils/logger"; import baseFocusPointCosts from "@/static/json/baseFocusPointCosts.json"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises export const focusController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); switch (req.query.op) { diff --git a/src/controllers/api/getGuildController.ts b/src/controllers/api/getGuildController.ts index d112f9960..076e59345 100644 --- a/src/controllers/api/getGuildController.ts +++ b/src/controllers/api/getGuildController.ts @@ -4,6 +4,7 @@ import { Guild } from "@/src/models/guildModel"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { toOid } from "@/src/helpers/inventoryHelpers"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises const getGuildController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const inventory = await Inventory.findOne({ accountOwnerId: accountId }); diff --git a/src/controllers/api/getGuildDojoController.ts b/src/controllers/api/getGuildDojoController.ts index a220bb7e1..af60b492a 100644 --- a/src/controllers/api/getGuildDojoController.ts +++ b/src/controllers/api/getGuildDojoController.ts @@ -4,6 +4,7 @@ import { Guild } from "@/src/models/guildModel"; import { IDojoClient, IDojoComponentClient } from "@/src/types/guildTypes"; import { toOid, toMongoDate } from "@/src/helpers/inventoryHelpers"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises export const getGuildDojoController: RequestHandler = async (req, res) => { const guildId = req.query.guildId as string; diff --git a/src/controllers/api/hostSessionController.ts b/src/controllers/api/hostSessionController.ts index 1745d9944..94ca633ad 100644 --- a/src/controllers/api/hostSessionController.ts +++ b/src/controllers/api/hostSessionController.ts @@ -4,6 +4,7 @@ import { createNewSession } from "@/src/managers/sessionManager"; import { logger } from "@/src/utils/logger"; import { ISession } from "@/src/types/session"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises const hostSessionController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const hostSessionRequest = JSON.parse(req.body as string) as ISession; diff --git a/src/controllers/api/infestedFoundryController.ts b/src/controllers/api/infestedFoundryController.ts index 26b98803e..85c509215 100644 --- a/src/controllers/api/infestedFoundryController.ts +++ b/src/controllers/api/infestedFoundryController.ts @@ -4,6 +4,7 @@ import { getJSONfromString } from "@/src/helpers/stringHelpers"; import { getInventory, addMiscItems } from "@/src/services/inventoryService"; import { IOid } from "@/src/types/commonTypes"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises export const infestedFoundryController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const payload = getJSONfromString(req.body.toString()); diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index b2738bf8e..03383df8f 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -1,15 +1,15 @@ -/* eslint-disable @typescript-eslint/no-misused-promises */ +import { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { toInventoryResponse } from "@/src/helpers/inventoryHelpers"; import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; -import { Request, RequestHandler, Response } from "express"; import { config } from "@/src/services/configService"; import allMissions from "@/static/fixed_responses/allMissions.json"; import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes"; import { IShipInventory } from "@/src/types/inventoryTypes/inventoryTypes"; import { ExportCustoms, ExportFlavour, ExportKeys, ExportResources } from "warframe-public-export-plus"; -const inventoryController: RequestHandler = async (request: Request, response: Response) => { +// eslint-disable-next-line @typescript-eslint/no-misused-promises +const inventoryController: RequestHandler = async (request, response) => { let accountId; try { accountId = await getAccountIdForRequest(request); diff --git a/src/controllers/api/logoutController.ts b/src/controllers/api/logoutController.ts index 735014d4f..a6faa008a 100644 --- a/src/controllers/api/logoutController.ts +++ b/src/controllers/api/logoutController.ts @@ -2,6 +2,7 @@ import { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { Account } from "@/src/models/loginModel"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises const logoutController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const account = await Account.findOne({ _id: accountId }); diff --git a/src/controllers/api/modularWeaponCraftingController.ts b/src/controllers/api/modularWeaponCraftingController.ts index c1cd7bc8d..092447649 100644 --- a/src/controllers/api/modularWeaponCraftingController.ts +++ b/src/controllers/api/modularWeaponCraftingController.ts @@ -18,6 +18,7 @@ interface IModularCraftRequest { Parts: string[]; } +// eslint-disable-next-line @typescript-eslint/no-misused-promises export const modularWeaponCraftingController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const data: IModularCraftRequest = getJSONfromString(req.body.toString()); diff --git a/src/controllers/api/nameWeaponController.ts b/src/controllers/api/nameWeaponController.ts index 7543cbc42..c32f0fe8c 100644 --- a/src/controllers/api/nameWeaponController.ts +++ b/src/controllers/api/nameWeaponController.ts @@ -8,6 +8,7 @@ interface INameWeaponRequest { ItemName: string; } +// eslint-disable-next-line @typescript-eslint/no-misused-promises export const nameWeaponController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const inventory = await getInventory(accountId); diff --git a/src/controllers/api/purchaseController.ts b/src/controllers/api/purchaseController.ts index cf32a95d8..9e8bcb454 100644 --- a/src/controllers/api/purchaseController.ts +++ b/src/controllers/api/purchaseController.ts @@ -1,9 +1,10 @@ +import { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { toPurchaseRequest } from "@/src/helpers/purchaseHelpers"; import { handlePurchase } from "@/src/services/purchaseService"; -import { Request, Response } from "express"; -export const purchaseController = async (req: Request, res: Response) => { +// eslint-disable-next-line @typescript-eslint/no-misused-promises +export const purchaseController: RequestHandler = async (req, res) => { const purchaseRequest = toPurchaseRequest(JSON.parse(String(req.body))); const accountId = await getAccountIdForRequest(req); const response = await handlePurchase(purchaseRequest, accountId); diff --git a/src/controllers/api/sellController.ts b/src/controllers/api/sellController.ts index a2a362289..f242ccba1 100644 --- a/src/controllers/api/sellController.ts +++ b/src/controllers/api/sellController.ts @@ -3,6 +3,7 @@ import { ISellRequest } from "@/src/types/sellTypes"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory, addMods, addRecipes } from "@/src/services/inventoryService"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises export const sellController: RequestHandler = async (req, res) => { const payload: ISellRequest = JSON.parse(req.body.toString()); const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/setBootLocationController.ts b/src/controllers/api/setBootLocationController.ts index 599044a02..a91f63a10 100644 --- a/src/controllers/api/setBootLocationController.ts +++ b/src/controllers/api/setBootLocationController.ts @@ -3,6 +3,7 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { getPersonalRooms } from "@/src/services/personalRoomsService"; import { TBootLocation } from "@/src/types/shipTypes"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises export const setBootLocationController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const personalRooms = await getPersonalRooms(accountId); diff --git a/src/controllers/api/setSupportedSyndicateController.ts b/src/controllers/api/setSupportedSyndicateController.ts index e22b659fa..619fb44c3 100644 --- a/src/controllers/api/setSupportedSyndicateController.ts +++ b/src/controllers/api/setSupportedSyndicateController.ts @@ -2,6 +2,7 @@ import { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory } from "@/src/services/inventoryService"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises export const setSupportedSyndicateController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const inventory = await getInventory(accountId); diff --git a/src/controllers/api/startDojoRecipeController.ts b/src/controllers/api/startDojoRecipeController.ts index 8b4104ac2..a278f31cc 100644 --- a/src/controllers/api/startDojoRecipeController.ts +++ b/src/controllers/api/startDojoRecipeController.ts @@ -8,6 +8,7 @@ interface IStartDojoRecipeRequest { Revision: number; } +// eslint-disable-next-line @typescript-eslint/no-misused-promises export const startDojoRecipeController: RequestHandler = async (req, res) => { const guild = await getGuildForRequest(req); // At this point, we know that a member of the guild is making this request. Assuming they are allowed to start a build. diff --git a/src/controllers/api/stepSequencersController.ts b/src/controllers/api/stepSequencersController.ts index 45ea01ba0..bb963b921 100644 --- a/src/controllers/api/stepSequencersController.ts +++ b/src/controllers/api/stepSequencersController.ts @@ -3,6 +3,7 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { getInventory } from "@/src/services/inventoryService"; import { IStepSequencer } from "@/src/types/inventoryTypes/inventoryTypes"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises export const stepSequencersController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const inventory = await getInventory(accountId); diff --git a/src/controllers/api/syndicateSacrificeController.ts b/src/controllers/api/syndicateSacrificeController.ts index e6ee04b9e..d67f68b56 100644 --- a/src/controllers/api/syndicateSacrificeController.ts +++ b/src/controllers/api/syndicateSacrificeController.ts @@ -3,6 +3,7 @@ import { syndicateSacrifice } from "@/src/services/inventoryService"; import { ISyndicateSacrifice } from "@/src/types/syndicateTypes"; import { RequestHandler } from "express"; import { getAccountIdForRequest } from "@/src/services/loginService"; + // eslint-disable-next-line @typescript-eslint/no-misused-promises const syndicateSacrificeController: RequestHandler = async (request, response) => { const accountId = await getAccountIdForRequest(request); diff --git a/src/controllers/api/updateChallengeProgressController.ts b/src/controllers/api/updateChallengeProgressController.ts index e41880e64..bc91f9d36 100644 --- a/src/controllers/api/updateChallengeProgressController.ts +++ b/src/controllers/api/updateChallengeProgressController.ts @@ -4,6 +4,7 @@ import { getAccountIdForRequest } from "@/src/services/loginService"; import { updateChallengeProgress } from "@/src/services/inventoryService"; import { IUpdateChallengeProgressRequest } from "@/src/types/requestTypes"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises const updateChallengeProgressController: RequestHandler = async (req, res) => { const payload: IUpdateChallengeProgressRequest = getJSONfromString(req.body.toString()); const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/upgradesController.ts b/src/controllers/api/upgradesController.ts index 25b548e63..e2f7f0525 100644 --- a/src/controllers/api/upgradesController.ts +++ b/src/controllers/api/upgradesController.ts @@ -5,6 +5,7 @@ import { IMiscItem, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTy import { getAccountIdForRequest } from "@/src/services/loginService"; import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises export const upgradesController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const payload = JSON.parse(req.body.toString()) as IUpgradesRequest; diff --git a/src/controllers/custom/updateConfigDataController.ts b/src/controllers/custom/updateConfigDataController.ts index b7521a1a6..8a23cd1b3 100644 --- a/src/controllers/custom/updateConfigDataController.ts +++ b/src/controllers/custom/updateConfigDataController.ts @@ -1,6 +1,7 @@ import { RequestHandler } from "express"; import { updateConfig } from "@/src/services/configService"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises const updateConfigDataController: RequestHandler = async (req, res) => { await updateConfig(req.body.toString()); res.end(); diff --git a/src/controllers/stats/viewController.ts b/src/controllers/stats/viewController.ts index 033724336..3d6b9e209 100644 --- a/src/controllers/stats/viewController.ts +++ b/src/controllers/stats/viewController.ts @@ -6,6 +6,7 @@ import { config } from "@/src/services/configService"; import view from "@/static/fixed_responses/view.json"; import allScans from "@/static/fixed_responses/allScans.json"; +// eslint-disable-next-line @typescript-eslint/no-misused-promises const viewController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const inventory = await Inventory.findOne({ accountOwnerId: accountId }); diff --git a/src/routes/cache.ts b/src/routes/cache.ts index adc69b2a5..5c1df0d6f 100644 --- a/src/routes/cache.ts +++ b/src/routes/cache.ts @@ -16,6 +16,7 @@ cacheRouter.get(/^\/origin\/[a-zA-Z0-9]+\/[0-9]+\/H\.Cache\.bin.*$/, (_req, res) res.sendFile(`static/data/H.Cache_${buildConfig.version}.bin`, { root: "./" }); }); +// eslint-disable-next-line @typescript-eslint/no-misused-promises cacheRouter.get(/\.bk2!/, async (req, res) => { try { const dir = req.path.substr(0, req.path.lastIndexOf("/"));