mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
Clear the correct cache for webhooks
This commit is contained in:
parent
ef22391743
commit
af095cd801
@ -50,3 +50,4 @@ export const CACHE_FEDERATION = "federation";
|
|||||||
export const CACHE_IRC_BRIDGE = "irc-bridge";
|
export const CACHE_IRC_BRIDGE = "irc-bridge";
|
||||||
export const CACHE_STICKERS = "stickers";
|
export const CACHE_STICKERS = "stickers";
|
||||||
export const CACHE_TELEGRAM_BRIDGE = "telegram-bridge";
|
export const CACHE_TELEGRAM_BRIDGE = "telegram-bridge";
|
||||||
|
export const CACHE_WEBHOOKS_BRIDGE = "webhooks-bridge";
|
@ -1,6 +1,6 @@
|
|||||||
import { GET, Path, PathParam, POST, QueryParam } from "typescript-rest";
|
import { GET, Path, PathParam, POST, QueryParam } from "typescript-rest";
|
||||||
import { AdminService } from "./AdminService";
|
import { AdminService } from "./AdminService";
|
||||||
import { Cache, CACHE_INTEGRATIONS, CACHE_TELEGRAM_BRIDGE } from "../../MemoryCache";
|
import { Cache, CACHE_INTEGRATIONS, CACHE_WEBHOOKS_BRIDGE } from "../../MemoryCache";
|
||||||
import { LogService } from "matrix-js-snippets";
|
import { LogService } from "matrix-js-snippets";
|
||||||
import { ApiError } from "../ApiError";
|
import { ApiError } from "../ApiError";
|
||||||
import WebhookBridgeRecord from "../../db/models/WebhookBridgeRecord";
|
import WebhookBridgeRecord from "../../db/models/WebhookBridgeRecord";
|
||||||
@ -76,7 +76,7 @@ export class AdminWebhooksService {
|
|||||||
|
|
||||||
LogService.info("AdminWebhooksService", userId + " updated Webhook Bridge " + bridge.id);
|
LogService.info("AdminWebhooksService", userId + " updated Webhook Bridge " + bridge.id);
|
||||||
|
|
||||||
Cache.for(CACHE_TELEGRAM_BRIDGE).clear();
|
Cache.for(CACHE_WEBHOOKS_BRIDGE).clear();
|
||||||
Cache.for(CACHE_INTEGRATIONS).clear();
|
Cache.for(CACHE_INTEGRATIONS).clear();
|
||||||
return this.getBridge(scalarToken, bridge.id);
|
return this.getBridge(scalarToken, bridge.id);
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ export class AdminWebhooksService {
|
|||||||
});
|
});
|
||||||
LogService.info("AdminWebhooksService", userId + " created a new Webhook Bridge with provisioning URL " + request.provisionUrl);
|
LogService.info("AdminWebhooksService", userId + " created a new Webhook Bridge with provisioning URL " + request.provisionUrl);
|
||||||
|
|
||||||
Cache.for(CACHE_TELEGRAM_BRIDGE).clear();
|
Cache.for(CACHE_WEBHOOKS_BRIDGE).clear();
|
||||||
Cache.for(CACHE_INTEGRATIONS).clear();
|
Cache.for(CACHE_INTEGRATIONS).clear();
|
||||||
return this.getBridge(scalarToken, bridge.id);
|
return this.getBridge(scalarToken, bridge.id);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user