From 6b01c856e7e08e33af575a1b2434e51788604628 Mon Sep 17 00:00:00 2001 From: alma Date: Sun, 20 Apr 2025 16:20:24 +0200 Subject: [PATCH] carnet route --- app/api/nextcloud/status/route.ts | 3 +++ prisma/schema.prisma | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/api/nextcloud/status/route.ts b/app/api/nextcloud/status/route.ts index e963f892..56411136 100644 --- a/app/api/nextcloud/status/route.ts +++ b/app/api/nextcloud/status/route.ts @@ -349,6 +349,9 @@ export async function GET() { throw new Error('Failed to get WebDAV credentials'); } + // Ensure the folder structure exists + await ensureFolderStructure(nextcloudUrl, nextcloudUsername, webdavPassword); + // Get folder structure const folders = await getFolderStructure(nextcloudUrl, nextcloudUsername, webdavPassword); diff --git a/prisma/schema.prisma b/prisma/schema.prisma index c4d4393a..aa344c5f 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -8,7 +8,7 @@ generator client { datasource db { provider = "postgresql" - url = env("DATABASE_URL") + url = env("NEWSDB_URL") } model User {