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
|
// First, ensure the Private folder exists
|
||||||
await createFolder(nextcloudUrl, username, password, 'Private');
|
await createFolder(nextcloudUrl, username, password, 'Private');
|
||||||
|
|
||||||
// Then create Diary folder inside Private
|
// Create all required subfolders
|
||||||
await createFolder(nextcloudUrl, username, password, 'Private/Diary');
|
const subfolders = [
|
||||||
|
'Private/Diary',
|
||||||
|
'Private/Health',
|
||||||
|
'Private/Contacts',
|
||||||
|
'Private/Notes'
|
||||||
|
];
|
||||||
|
|
||||||
// Finally create Health folder inside Private
|
for (const folder of subfolders) {
|
||||||
await createFolder(nextcloudUrl, username, password, 'Private/Health');
|
await createFolder(nextcloudUrl, username, password, folder);
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error creating folder structure:', error);
|
console.error('Error creating folder structure:', error);
|
||||||
// Don't throw the error, just log it
|
// Don't throw the error, just log it
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user