Regenerate configs improvements
All checks were successful
Close stale issues and PRs / stale (push) Successful in 33s

- Fix certificates
- Adds dry run
- code cleanup
This commit is contained in:
Jamie Curnow
2026-03-03 08:44:42 +10:00
parent f1e95c9c52
commit eb67b3bfb6
9 changed files with 99 additions and 81 deletions

View File

@@ -3,7 +3,7 @@
import { Model } from "objection";
import db from "../db.js";
import { convertBoolFieldsToInt, convertIntFieldsToBool } from "../lib/helpers.js";
import { castJsonIfNeed, convertBoolFieldsToInt, convertIntFieldsToBool } from "../lib/helpers.js";
import Certificate from "./certificate.js";
import now from "./now_helper.js";
import User from "./user.js";
@@ -70,6 +70,18 @@ class RedirectionHost extends Model {
return ["domain_names", "meta"];
}
static get defaultAllowGraph() {
return "[owner,certificate]";
}
static get defaultExpand() {
return ["certificate", "owner"];
}
static get defaultOrder() {
return [castJsonIfNeed("domain_names"), "ASC"];
}
static get relationMappings() {
return {
owner: {