carnet panel2
This commit is contained in:
parent
873f8488ab
commit
a5be5283ae
@ -2,7 +2,7 @@ import { NextResponse } from 'next/server';
|
|||||||
import { getServerSession } from 'next-auth';
|
import { getServerSession } from 'next-auth';
|
||||||
import { PrismaClient } from '@prisma/client';
|
import { PrismaClient } from '@prisma/client';
|
||||||
import { authOptions } from '@/app/api/auth/[...nextauth]/route';
|
import { authOptions } from '@/app/api/auth/[...nextauth]/route';
|
||||||
import { WebDAVClient } from 'webdav';
|
import { createClient } from 'webdav';
|
||||||
|
|
||||||
// Use a single PrismaClient instance
|
// Use a single PrismaClient instance
|
||||||
declare global {
|
declare global {
|
||||||
@ -36,7 +36,7 @@ export async function GET(request: Request) {
|
|||||||
console.log('Accessing folder:', folder);
|
console.log('Accessing folder:', folder);
|
||||||
|
|
||||||
// Initialize WebDAV client
|
// Initialize WebDAV client
|
||||||
const client = new WebDAVClient({
|
const client = createClient({
|
||||||
username: credentials.username,
|
username: credentials.username,
|
||||||
password: credentials.password,
|
password: credentials.password,
|
||||||
baseURL: process.env.NEXTCLOUD_URL,
|
baseURL: process.env.NEXTCLOUD_URL,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user