fix: update contact URL structure for Radicale sync functions

This commit is contained in:
2025-12-04 12:02:08 +01:00
parent 1bc9dc2dd5
commit ad6338ecae

View File

@@ -155,7 +155,7 @@ async function syncContactToRadicaleInternal(contact, forceUpdate = false) {
const baseUrl = config.url.endsWith('/') ? config.url : config.url + '/';
// Construct the URL for this specific contact
const vcardUrl = `${baseUrl}${config.username}/contacts/contact-${contact.contact_id}.vcf`;
const vcardUrl = `${baseUrl}${config.username}/b576a569-4af7-5812-7ddd-3c7cb8caf692/contact-${contact.contact_id}.vcf`;
const headers = {
'Authorization': `Basic ${auth}`,
@@ -235,7 +235,7 @@ export async function deleteContactFromRadicale(contactId) {
const baseUrl = config.url.endsWith('/') ? config.url : config.url + '/';
// Construct the URL for this specific contact
const vcardUrl = `${baseUrl}${config.username}/contacts/contact-${contactId}.vcf`;
const vcardUrl = `${baseUrl}${config.username}/b576a569-4af7-5812-7ddd-3c7cb8caf692/contact-${contactId}.vcf`;
const response = await fetch(vcardUrl, {
method: 'DELETE',
@@ -260,7 +260,6 @@ export async function deleteContactFromRadicale(contactId) {
// Sync contact asynchronously (fire and forget)
export function syncContactAsync(contact) {
console.log(contact, isRadicaleEnabled());
if (!isRadicaleEnabled()) {
return;
}