mirror of
https://github.com/outline/outline.git
synced 2026-11-21 05:24:03 +03:00
16 lines
476 B
TypeScript
16 lines
476 B
TypeScript
import { OAuthAuthentication } from "@server/models";
|
|
import type { OAuthClientEvent, Event as TEvent } from "@server/types";
|
|
import BaseProcessor from "./BaseProcessor";
|
|
|
|
export default class OAuthClientDeletedProcessor extends BaseProcessor {
|
|
static applicableEvents: TEvent["name"][] = ["oauthClients.delete"];
|
|
|
|
async perform(event: OAuthClientEvent) {
|
|
await OAuthAuthentication.destroy({
|
|
where: {
|
|
oauthClientId: event.modelId,
|
|
},
|
|
});
|
|
}
|
|
}
|