chore: use inventory projection for getGuild requests
All checks were successful
Build / build (22) (pull_request) Successful in 1m14s
Build / build (20) (push) Successful in 42s
Build / build (18) (push) Successful in 1m7s
Build / build (22) (push) Successful in 1m2s
Build / build (18) (pull_request) Successful in 46s
Build / build (20) (pull_request) Successful in 1m5s

This commit is contained in:
Sainan 2025-03-16 14:24:16 +01:00
parent c3a9b42fa2
commit a155cab7cc
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) {