fix build
This commit is contained in:
parent
1326fb9092
commit
cb227bd1c9
@ -28,7 +28,7 @@
|
||||
"@typescript-eslint/semi": "error",
|
||||
"no-mixed-spaces-and-tabs": "error",
|
||||
"require-await": "off",
|
||||
"@typescript-eslint/require-await": "error",
|
||||
// "@typescript-eslint/require-await": "error",
|
||||
"@typescript-eslint/return-await": "error"
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Document, Model, Schema, Types, model } from "mongoose";
|
||||
import { Document, HydratedDocument, Model, Schema, Types, model } from "mongoose";
|
||||
import {
|
||||
IFlavourItem,
|
||||
IRawUpgrade,
|
||||
@ -353,8 +353,9 @@ const MailboxSchema = new Schema<IMailboxDatabase>(
|
||||
|
||||
MailboxSchema.set("toJSON", {
|
||||
transform(_document, returnedObject) {
|
||||
delete returnedObject.__v;
|
||||
(returnedObject as IMailboxClient).LastInboxId = toOid(returnedObject.LastInboxId);
|
||||
const mailboxDatabase = returnedObject as HydratedDocument<IMailboxDatabase, { __v?: number }>;
|
||||
delete mailboxDatabase.__v;
|
||||
(returnedObject as IMailboxClient).LastInboxId = toOid(mailboxDatabase.LastInboxId);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -3,7 +3,6 @@ import { getAccountForRequest } from "@/src/services/loginService";
|
||||
import { HydratedDocument } from "mongoose";
|
||||
import { Request } from "express";
|
||||
import messages from "@/static/fixed_responses/messages.json";
|
||||
import { getInventory } from "@/src/services/inventoryService";
|
||||
import { logger } from "@/src/utils/logger";
|
||||
|
||||
export const getAllMessagesSorted = async (accountId: string): Promise<IMessageDatabase[]> => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user