Implement the request cancellation
This commit is contained in:
parent
9ea417ddc1
commit
c014e17da2
2 changed files with 56 additions and 12 deletions
18
module/sockets/query/cancel.mjs
Normal file
18
module/sockets/query/cancel.mjs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { DialogManager } from "../../utils/DialogManager.mjs";
|
||||
|
||||
export async function queryCancel(payload) {
|
||||
const { id } = payload;
|
||||
|
||||
if (!id) {
|
||||
ui.notifications.error(game.i18n.format(
|
||||
`taf.notifs.error.malformed-socket-payload`,
|
||||
{
|
||||
event: `query.cancel`,
|
||||
details: `A request ID must be provided`,
|
||||
}),
|
||||
);
|
||||
return;
|
||||
};
|
||||
|
||||
await DialogManager.close(id);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue