mirror of
https://github.com/outline/outline.git
synced 2026-11-21 05:24:03 +03:00
* Update task scheduling to use instance method * Delete update_task_schedule.sh * Applied automatic fixes * tsc --------- Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com> Co-authored-by: Tom Moor <tom@getoutline.com>
12 lines
424 B
TypeScript
12 lines
424 B
TypeScript
import { Event as TEvent, UserEvent } from "@server/types";
|
|
import CleanupDemotedUserTask from "../tasks/CleanupDemotedUserTask";
|
|
import BaseProcessor from "./BaseProcessor";
|
|
|
|
export default class UserDemotedProcessor extends BaseProcessor {
|
|
static applicableEvents: TEvent["name"][] = ["users.demote"];
|
|
|
|
async perform(event: UserEvent) {
|
|
await new CleanupDemotedUserTask().schedule({ userId: event.userId });
|
|
}
|
|
}
|