carnet panel2
This commit is contained in:
parent
ea94d5eb79
commit
e64a54c929
@ -41,8 +41,8 @@ export async function GET(request: Request) {
|
|||||||
throw new Error('NEXTCLOUD_URL environment variable is not set');
|
throw new Error('NEXTCLOUD_URL environment variable is not set');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure baseURL ends with a slash
|
// Remove trailing slash if present
|
||||||
const normalizedBaseURL = baseURL.endsWith('/') ? baseURL : `${baseURL}/`;
|
const normalizedBaseURL = baseURL.endsWith('/') ? baseURL.slice(0, -1) : baseURL;
|
||||||
|
|
||||||
const client = createClient({
|
const client = createClient({
|
||||||
username: credentials.username,
|
username: credentials.username,
|
||||||
@ -50,8 +50,8 @@ export async function GET(request: Request) {
|
|||||||
baseURL: normalizedBaseURL,
|
baseURL: normalizedBaseURL,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Construct the folder path without leading slash
|
// Construct the folder path with leading slash
|
||||||
const folderPath = `remote.php/dav/files/${credentials.username}/Private/${folder}`;
|
const folderPath = `/remote.php/dav/files/${credentials.username}/Private/${folder}`;
|
||||||
console.log('Full folder path:', folderPath);
|
console.log('Full folder path:', folderPath);
|
||||||
|
|
||||||
// List files in the specified folder
|
// List files in the specified folder
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user