revert loadoutService

This commit is contained in:
Sainan 2024-12-29 21:42:54 +01:00
parent afba6b9e8c
commit 981df33601

View File

@ -1,8 +1,7 @@
import { Loadout } from "@/src/models/inventoryModels/loadoutModel";
import { logger } from "@/src/utils/logger";
import { ILoadoutDatabase } from "../types/saveLoadoutTypes";
export const getLoadout = async (accountId: string): Promise<ILoadoutDatabase> => {
export const getLoadout = async (accountId: string) => {
const loadout = await Loadout.findOne({ loadoutOwnerId: accountId });
if (!loadout) {
@ -10,5 +9,5 @@ export const getLoadout = async (accountId: string): Promise<ILoadoutDatabase> =
throw new Error("loadout not found");
}
return loadout.toJSON();
return loadout;
};