v1.9.0 #437

Merged
LukeGus merged 33 commits from dev-1.9.0 into main 2025-11-17 15:46:05 +00:00
Showing only changes of commit 5ce2cae4ff - Show all commits

View File

@@ -10,6 +10,7 @@ import {
fileManagerShortcuts, fileManagerShortcuts,
sshFolders, sshFolders,
commandHistory, commandHistory,
recentActivity,
} from "../db/schema.js"; } from "../db/schema.js";
import { eq, and, desc, isNotNull, or } from "drizzle-orm"; import { eq, and, desc, isNotNull, or } from "drizzle-orm";
import type { Request, Response } from "express"; import type { Request, Response } from "express";
@@ -929,6 +930,24 @@ router.delete(
), ),
); );
await db
.delete(sshCredentialUsage)
.where(
and(
eq(sshCredentialUsage.hostId, numericHostId),
eq(sshCredentialUsage.userId, userId),
),
);
await db
.delete(recentActivity)
.where(
and(
eq(recentActivity.hostId, numericHostId),
eq(recentActivity.userId, userId),
),
);
// Now delete the host itself // Now delete the host itself
await db await db
.delete(sshData) .delete(sshData)