chore(webui): refresh when creating/deleting a clan in-game
All checks were successful
Build / build (pull_request) Successful in 3m4s
All checks were successful
Build / build (pull_request) Successful in 3m4s
So the clan tab shows/hides instantly as expected.
This commit is contained in:
parent
66d3057d40
commit
eea3dcd2fd
@ -5,6 +5,7 @@ import { Guild, GuildMember } from "../../models/guildModel.ts";
|
||||
import { createUniqueClanName, getGuildClient, giveClanKey } from "../../services/guildService.ts";
|
||||
import { getInventory } from "../../services/inventoryService.ts";
|
||||
import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
|
||||
import { sendWsBroadcastTo } from "../../services/wsService.ts";
|
||||
|
||||
export const createGuildController: RequestHandler = async (req, res) => {
|
||||
const account = await getAccountForRequest(req);
|
||||
@ -37,6 +38,7 @@ export const createGuildController: RequestHandler = async (req, res) => {
|
||||
...(await getGuildClient(guild, account)),
|
||||
InventoryChanges: inventoryChanges
|
||||
});
|
||||
sendWsBroadcastTo(account._id.toString(), { update_inventory: true });
|
||||
};
|
||||
|
||||
interface ICreateGuildRequest {
|
||||
|
||||
@ -10,6 +10,7 @@ import {
|
||||
import { createMessage } from "../../services/inboxService.ts";
|
||||
import { getInventory } from "../../services/inventoryService.ts";
|
||||
import { getAccountForRequest, getSuffixedName } from "../../services/loginService.ts";
|
||||
import { sendWsBroadcastTo } from "../../services/wsService.ts";
|
||||
import { GuildPermission } from "../../types/guildTypes.ts";
|
||||
import type { RequestHandler } from "express";
|
||||
|
||||
@ -85,6 +86,7 @@ export const removeFromGuildController: RequestHandler = async (req, res) => {
|
||||
ItemToRemove: "/Lotus/Types/Keys/DojoKey",
|
||||
RecipeToRemove: "/Lotus/Types/Keys/DojoKeyBlueprint"
|
||||
});
|
||||
sendWsBroadcastTo(payload.userId, { update_inventory: true });
|
||||
};
|
||||
|
||||
interface IRemoveFromGuildRequest {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user