mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-20 05:28:11 +02:00
feat: implement session snapshot creation and history viewing with new pages and components.
This commit is contained in:
1 parent
7765f97a1f
commit
c9cf83d4c7
7 files changed
+309
-22
No files matched your search
@@ -0,0 +1,15 @@
|
||||
"use server";
|
||||
|
||||
import { db } from "@/db";
|
||||
import { sessionSnapshots } from "@/db/schema";
|
||||
import { eq } from "drizzle-orm";
|
||||
|
||||
export async function deleteSnapshot(id: number) {
|
||||
try {
|
||||
await db.delete(sessionSnapshots).where(eq(sessionSnapshots.id, id));
|
||||
return { success: true };
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
return { success: false, error: "Delete failed" };
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user