carnet api nc
This commit is contained in:
parent
7411a20f2a
commit
5a6f87227d
@ -95,11 +95,17 @@ async function ensureFolderStructure(nextcloudUrl: string, username: string, pas
|
||||
// First, ensure the Private folder exists
|
||||
await createFolder(nextcloudUrl, username, password, 'Private');
|
||||
|
||||
// Then create Diary folder inside Private
|
||||
await createFolder(nextcloudUrl, username, password, 'Private/Diary');
|
||||
// Create all required subfolders
|
||||
const subfolders = [
|
||||
'Private/Diary',
|
||||
'Private/Health',
|
||||
'Private/Contacts',
|
||||
'Private/Notes'
|
||||
];
|
||||
|
||||
// Finally create Health folder inside Private
|
||||
await createFolder(nextcloudUrl, username, password, 'Private/Health');
|
||||
for (const folder of subfolders) {
|
||||
await createFolder(nextcloudUrl, username, password, folder);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error creating folder structure:', error);
|
||||
// Don't throw the error, just log it
|
||||
|
||||
Loading…
Reference in New Issue
Block a user