chore: use inventory projection for getGuild requests #1212

Merged
Sainan merged 1 commits from guild-proj into main 2025-03-16 08:16:50 -07:00
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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) {