feat: complete production backend integration

This commit is contained in:
Marek Miklewicz
2026-06-02 20:51:57 +02:00
parent d3f2fd69db
commit 4b531a4c24
20 changed files with 853 additions and 40 deletions
+2 -1
View File
@@ -13,8 +13,9 @@ return static function (AppContext $ctx): void {
try {
$ctx->requireCsrf('update:' . $id);
$input = normalize_rule_post($_POST);
$patch = RuleValidator::validate($input, $ctx->settings);
$patch = attach_rule_scope($ctx, RuleValidator::validate($input, $ctx->settings));
$ctx->rules->update($ctx->daUser->username(), $id, $patch);
$ctx->syncActiveBackend();
Http::redirect($ctx->url('index.html', ['status' => 'updated']));
} catch (Throwable $e) {
$errors[] = $e->getMessage();