This commit is contained in:
2026-09-20 07:27:29 +01:00
parent dc2cd66b25
commit 8ec44ee0a7
70 changed files with 2657 additions and 128 deletions
@@ -2,6 +2,7 @@ import type {
BUN_SQLITE_WGUI_CLIENTS,
BUN_SQLITE_WGUI_HOSTS,
} from "@/db/types/db";
import grabClientRules from "@/src/functions/backend/db/client-rules/grab-client-rules";
import type { PagePropsType, PageQueryObject, TableType } from "@/src/types";
import BunSQLite from "@moduletrace/bun-sqlite";
import type { BunextPageServerFn } from "@moduletrace/bunext/types";
@@ -32,10 +33,19 @@ const server: BunextPageServerFn<PagePropsType> = async ({
},
});
const clients = host_clients.payload || null;
const client_rules = await grabClientRules({
client_ids: (clients || [])
.map((client) => client.id)
.filter((id): id is number => Boolean(id)),
});
return {
props: {
host: host_record_res.singleRes || null,
clients: host_clients.payload || null,
clients,
client_rules,
},
};
};