feat: derive autoresponder schedule from backend
This commit is contained in:
@@ -7,7 +7,7 @@ return static function (AppContext $ctx): void {
|
||||
$ctx->requireCsrf('toggle:' . $id);
|
||||
$rule = $ctx->rules->find($ctx->daUser->username(), $id);
|
||||
if ($rule === null) {
|
||||
throw new RuntimeException('Rule not found');
|
||||
throw new RuntimeException($ctx->t('Rule not found'));
|
||||
}
|
||||
$ctx->rules->update($ctx->daUser->username(), $id, ['enabled' => empty($rule['enabled'])]);
|
||||
Http::redirect($ctx->url('index.html', ['status' => 'toggled']));
|
||||
|
||||
Reference in New Issue
Block a user