From a5be5283ae04bada045a3e4d3cb0d0b1b4c6178f Mon Sep 17 00:00:00 2001 From: alma Date: Sun, 20 Apr 2025 16:39:25 +0200 Subject: [PATCH] carnet panel2 --- app/api/nextcloud/files/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/nextcloud/files/route.ts b/app/api/nextcloud/files/route.ts index c6e6f3db..438220aa 100644 --- a/app/api/nextcloud/files/route.ts +++ b/app/api/nextcloud/files/route.ts @@ -2,7 +2,7 @@ import { NextResponse } from 'next/server'; import { getServerSession } from 'next-auth'; import { PrismaClient } from '@prisma/client'; import { authOptions } from '@/app/api/auth/[...nextauth]/route'; -import { WebDAVClient } from 'webdav'; +import { createClient } from 'webdav'; // Use a single PrismaClient instance declare global { @@ -36,7 +36,7 @@ export async function GET(request: Request) { console.log('Accessing folder:', folder); // Initialize WebDAV client - const client = new WebDAVClient({ + const client = createClient({ username: credentials.username, password: credentials.password, baseURL: process.env.NEXTCLOUD_URL,