Updates
This commit is contained in:
@@ -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,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user