2024-02-18 13:58:43 +01:00
|
|
|
import { Loadout } from "@/src/models/inventoryModels/loadoutModel";
|
|
|
|
|
|
|
|
export const getLoadout = async (accountId: string) => {
|
|
|
|
const loadout = await Loadout.findOne({ loadoutOwnerId: accountId });
|
|
|
|
|
|
|
|
if (!loadout) {
|
2025-01-03 22:25:03 +01:00
|
|
|
throw new Error(`loadout not found for account ${accountId}`);
|
2024-02-18 13:58:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return loadout;
|
|
|
|
};
|