mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
bf45e97641
* Update types * fix circular dep * type imports * lint type imports and --fix
15 lines
483 B
TypeScript
15 lines
483 B
TypeScript
import { OAuthAuthentication } from "@server/models";
|
|
import type { Event as TEvent, UserEvent } from "@server/types";
|
|
import BaseProcessor from "./BaseProcessor";
|
|
|
|
export default class UserSuspendedProcessor extends BaseProcessor {
|
|
static applicableEvents: TEvent["name"][] = ["users.suspend"];
|
|
|
|
async perform(event: UserEvent) {
|
|
// Remove all OAuth authentications for this user.
|
|
await OAuthAuthentication.destroy({
|
|
where: { userId: event.userId },
|
|
});
|
|
}
|
|
}
|