carnet panel contact
This commit is contained in:
parent
0291ec7465
commit
e095592e19
@ -494,7 +494,10 @@ export default function CarnetPage() {
|
||||
setIsLoading(true);
|
||||
const vcardContent = generateVCard(contact);
|
||||
const filename = `${contact.id}.vcf`;
|
||||
const path = `/files/cube-${session.user.id}/Private/Contacts/${selectedFolder}/${filename}`;
|
||||
|
||||
// If we're in a specific group folder, use that as the path
|
||||
const folderPath = selectedFolder === 'Contacts' ? 'Contacts' : `Contacts/${selectedFolder}`;
|
||||
const path = `/files/cube-${session.user.id}/Private/${folderPath}/${filename}`;
|
||||
|
||||
const response = await fetch('/api/nextcloud/files', {
|
||||
method: 'PUT',
|
||||
@ -505,7 +508,7 @@ export default function CarnetPage() {
|
||||
id: path,
|
||||
title: filename,
|
||||
content: vcardContent,
|
||||
folder: `Contacts/${selectedFolder}`,
|
||||
folder: folderPath
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user