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
@@ -7,8 +7,9 @@ return static function (AppContext $ctx): void {
try {
$ctx->requireCsrf('create');
$input = normalize_rule_post($_POST);
$rule = RuleValidator::validate($input, $ctx->settings);
$rule = attach_rule_scope($ctx, RuleValidator::validate($input, $ctx->settings));
$ctx->rules->create($ctx->daUser->username(), $rule);
$ctx->syncActiveBackend();
Http::redirect($ctx->url('index.html', ['status' => 'created']));
} catch (Throwable $e) {
$errors[] = $e->getMessage();