From a155cab7ccb3232ac6d0103edfebc2c20b3abc93 Mon Sep 17 00:00:00 2001 From: Sainan Date: Sun, 16 Mar 2025 14:24:16 +0100 Subject: [PATCH] chore: use inventory projection for getGuild requests --- src/controllers/api/getGuildController.ts | 2 +- src/controllers/api/getGuildLogController.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/api/getGuildController.ts b/src/controllers/api/getGuildController.ts index 0b7c5a95..37a9ed26 100644 --- a/src/controllers/api/getGuildController.ts +++ b/src/controllers/api/getGuildController.ts @@ -7,7 +7,7 @@ import { createUniqueClanName, getGuildClient } from "@/src/services/guildServic const getGuildController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); - const inventory = await getInventory(accountId); + const inventory = await getInventory(accountId, "GuildId"); if (inventory.GuildId) { const guild = await Guild.findOne({ _id: inventory.GuildId }); if (guild) { diff --git a/src/controllers/api/getGuildLogController.ts b/src/controllers/api/getGuildLogController.ts index 47c94b63..91157e7e 100644 --- a/src/controllers/api/getGuildLogController.ts +++ b/src/controllers/api/getGuildLogController.ts @@ -7,7 +7,7 @@ import { RequestHandler } from "express"; export const getGuildLogController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); - const inventory = await getInventory(accountId); + const inventory = await getInventory(accountId, "GuildId"); if (inventory.GuildId) { const guild = await Guild.findOne({ _id: inventory.GuildId }); if (guild) { -- 2.47.2