carnet panel2

This commit is contained in:
alma 2025-04-20 16:39:25 +02:00
parent 873f8488ab
commit a5be5283ae

View File

@ -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,