feat: write the mairie status back to Nextcloud over CalDAV
REPORT by UID gives href + ETag + calendar-data, then PUT with If-Match: the resource URL is never guessed and a concurrent edit yields 412 instead of an overwrite. URL_COLLECTION is derived from URL_CALENDRIER.
This commit is contained in:
@@ -6,6 +6,11 @@
|
||||
export const URL_CALENDRIER =
|
||||
"https://atelier-huit.frama.space/remote.php/dav/calendars/Pierre/latelier-du-huit-sbastien_shared_by_admin/?export";
|
||||
|
||||
// La collection CalDAV (sans `?export`) est la cible des requêtes REPORT/PUT.
|
||||
// DÉRIVÉE plutôt que recopiée : une seule URL de calendrier dans le repo, donc
|
||||
// aucune dérive possible entre lecture et écriture.
|
||||
export const URL_COLLECTION = URL_CALENDRIER.replace(/\?export$/, "");
|
||||
|
||||
// fetchImpl est injecté (obligatoire) pour la testabilité.
|
||||
// Résultat discriminé : { ok:true, flux } | { ok:false, erreur }.
|
||||
export async function recupererFluxCalendrier(fetchImpl) {
|
||||
|
||||
Reference in New Issue
Block a user