interface-names
This commit is contained in:
parent
28ec68a86a
commit
2d4b139e0e
@ -52,6 +52,7 @@ import { modNames, relicNames, miscNames, resourceNames, gearNames, blueprintNam
|
|||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
const missionInventoryUpdateController: RequestHandler = async (req, res) => {
|
const missionInventoryUpdateController: RequestHandler = async (req, res) => {
|
||||||
|
const [data] = String(req.body).split("\n");
|
||||||
const id = req.query.accountId as string;
|
const id = req.query.accountId as string;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -7,7 +7,7 @@ import {
|
|||||||
IBooster
|
IBooster
|
||||||
} from "../types/inventoryTypes/inventoryTypes";
|
} from "../types/inventoryTypes/inventoryTypes";
|
||||||
import { IOid } from "../types/commonTypes";
|
import { IOid } from "../types/commonTypes";
|
||||||
import { ISuitDatabase, ISuitDocument } from "@/src/types/inventoryTypes/SuitTypes";
|
import { ISuitDatabase } from "@/src/types/inventoryTypes/SuitTypes";
|
||||||
import { IWeaponDatabase } from "@/src/types/inventoryTypes/weaponTypes";
|
import { IWeaponDatabase } from "@/src/types/inventoryTypes/weaponTypes";
|
||||||
|
|
||||||
const abilityOverrideSchema = new Schema({
|
const abilityOverrideSchema = new Schema({
|
||||||
@ -85,7 +85,7 @@ const RawUpgrades = new Schema({
|
|||||||
RawUpgrades.set("toJSON", {
|
RawUpgrades.set("toJSON", {
|
||||||
transform(_document, returnedObject) {
|
transform(_document, returnedObject) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
|
||||||
returnedObject.LastAdded = { $oid: returnedObject._id.toString() } satisfies Oid;
|
returnedObject.LastAdded = { $oid: returnedObject._id.toString() } satisfies IOid;
|
||||||
delete returnedObject._id;
|
delete returnedObject._id;
|
||||||
delete returnedObject.__v;
|
delete returnedObject.__v;
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ const Upgrade = new Schema({
|
|||||||
Upgrade.set("toJSON", {
|
Upgrade.set("toJSON", {
|
||||||
transform(_document, returnedObject) {
|
transform(_document, returnedObject) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
|
||||||
returnedObject.ItemId = { $oid: returnedObject._id.toString() } satisfies Oid;
|
returnedObject.ItemId = { $oid: returnedObject._id.toString() } satisfies IOid;
|
||||||
delete returnedObject._id;
|
delete returnedObject._id;
|
||||||
delete returnedObject.__v;
|
delete returnedObject.__v;
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ import {
|
|||||||
IRawUpgrade
|
IRawUpgrade
|
||||||
} from "@/src/types/inventoryTypes/inventoryTypes";
|
} from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { IMissionInventoryUpdate, IMissionInventoryUpdateGear } from "../types/missionInventoryUpdateType";
|
import { IMissionInventoryUpdate, IMissionInventoryUpdateGear } from "../types/missionInventoryUpdateType";
|
||||||
|
import { IGenericUpdate } from "../types/genericUpdate";
|
||||||
|
|
||||||
const createInventory = async (accountOwnerId: Types.ObjectId) => {
|
const createInventory = async (accountOwnerId: Types.ObjectId) => {
|
||||||
try {
|
try {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export interface IGenericUpdate {
|
export interface IGenericUpdate {
|
||||||
NodeIntrosCompleted: string | string[];
|
NodeIntrosCompleted: string | string[];
|
||||||
// AffiliationMods: any[];
|
// AffiliationMods: any[];
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import { Document, Types } from "mongoose";
|
import { Document, Types } from "mongoose";
|
||||||
import { IOid } from "../commonTypes";
|
import { IOid } from "../commonTypes";
|
||||||
import { IAbilityOverride, IColor, FocusSchool, IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import { IAbilityOverride, IColor, FocusSchool, IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
@ -33,7 +34,7 @@ export interface IInventoryResponse {
|
|||||||
DailyFocus: number;
|
DailyFocus: number;
|
||||||
GiftsRemaining: number;
|
GiftsRemaining: number;
|
||||||
HandlerPoints: number;
|
HandlerPoints: number;
|
||||||
MiscItems: IConsumable[];
|
MiscItems: IMiscItem[];
|
||||||
ChallengesFixVersion: number;
|
ChallengesFixVersion: number;
|
||||||
ChallengeProgress: IChallengeProgress[];
|
ChallengeProgress: IChallengeProgress[];
|
||||||
RawUpgrades: IRawUpgrade[];
|
RawUpgrades: IRawUpgrade[];
|
||||||
@ -319,7 +320,7 @@ export interface ICrewShipSalvageBinClass {
|
|||||||
export interface ICrewShipSalvagedWeaponSkin {
|
export interface ICrewShipSalvagedWeaponSkin {
|
||||||
ItemType: string;
|
ItemType: string;
|
||||||
UpgradeFingerprint?: string;
|
UpgradeFingerprint?: string;
|
||||||
ItemId?: Oid;
|
ItemId?: IOid;
|
||||||
_id?: Types.ObjectId;
|
_id?: Types.ObjectId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -931,7 +932,7 @@ export interface IProgress {
|
|||||||
export interface IRawUpgrade {
|
export interface IRawUpgrade {
|
||||||
ItemType: string;
|
ItemType: string;
|
||||||
ItemCount: number;
|
ItemCount: number;
|
||||||
LastAdded?: Oid;
|
LastAdded?: IOid;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IScoop {
|
export interface IScoop {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
export interface ISession {
|
export interface ISession {
|
||||||
sessionId: string;
|
sessionId: string;
|
||||||
creatorId: string;
|
creatorId: string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user