From 1d23f2736f4d79fcc70a05c08026468a44f30bed Mon Sep 17 00:00:00 2001 From: Sainan Date: Sun, 16 Mar 2025 08:16:49 -0700 Subject: [PATCH] chore: use inventory projection for getGuild requests (#1212) Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1212 --- 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 67940fde..a0386e76 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) {