feat: enable/disable urls on the fly

This commit is contained in:
diced
2025-01-31 13:12:18 -08:00
parent 76d0c0786a
commit 6b8b29ed29
10 changed files with 95 additions and 40 deletions

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Url" ADD COLUMN "enabled" BOOLEAN NOT NULL DEFAULT true;

View File

@@ -336,6 +336,7 @@ model Url {
views Int @default(0)
maxViews Int?
password String?
enabled Boolean @default(true)
User User? @relation(fields: [userId], references: [id], onDelete: SetNull, onUpdate: Cascade)
userId String?