Update clients fetch function
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import type {
|
||||
BUN_SQLITE_WGUI_CLIENTS,
|
||||
BUN_SQLITE_WGUI_HOSTS,
|
||||
} from "@/db/types/db";
|
||||
import type { BUN_SQLITE_WGUI_HOSTS } from "@/db/types/db";
|
||||
import grabClients from "@/src/functions/backend/db/clients/grab-clients";
|
||||
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";
|
||||
@@ -19,18 +17,8 @@ const server: BunextPageServerFn<PagePropsType> = async ({
|
||||
TableType
|
||||
>({ table: "hosts", targetId: page_query.host_id });
|
||||
|
||||
const host_clients = await BunSQLite.select<
|
||||
BUN_SQLITE_WGUI_CLIENTS,
|
||||
TableType
|
||||
>({
|
||||
table: "clients",
|
||||
query: {
|
||||
query: {
|
||||
host_id: {
|
||||
value: page_query.host_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
const host_clients = await grabClients({
|
||||
host_id: page_query.host_id,
|
||||
});
|
||||
|
||||
const clients = host_clients.payload || null;
|
||||
|
||||
Reference in New Issue
Block a user