Updates
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { AppData } from "@/src/data/app-data";
|
||||
import { NSQLITE_TEST_DB_USERS_PORTS, NSQLiteTables } from "@/src/db/types";
|
||||
import {
|
||||
NSQLITE_TURBOCI_ADMIN_USERS_PORTS,
|
||||
NSQLiteTables,
|
||||
} from "@/src/db/types";
|
||||
import { User } from "@/src/types";
|
||||
import BunSQLite from "@moduletrace/bun-sqlite";
|
||||
import { execSync, ExecSyncOptions } from "child_process";
|
||||
@@ -11,7 +14,7 @@ type Params = {
|
||||
|
||||
export default async function killAllTtydPorts({ user }: Params) {
|
||||
const user_ports_res = await BunSQLite.select<
|
||||
NSQLITE_TEST_DB_USERS_PORTS,
|
||||
NSQLITE_TURBOCI_ADMIN_USERS_PORTS,
|
||||
(typeof NSQLiteTables)[number]
|
||||
>({
|
||||
table: "users_ports",
|
||||
@@ -28,7 +31,7 @@ export default async function killAllTtydPorts({ user }: Params) {
|
||||
await killPort({ port: user_port.port });
|
||||
|
||||
await BunSQLite.delete<
|
||||
NSQLITE_TEST_DB_USERS_PORTS,
|
||||
NSQLITE_TURBOCI_ADMIN_USERS_PORTS,
|
||||
(typeof NSQLiteTables)[number]
|
||||
>({
|
||||
table: "users_ports",
|
||||
|
||||
Reference in New Issue
Block a user