From ae971eafd56d9415192b7723588ea204957d9b6c Mon Sep 17 00:00:00 2001 From: Adriana Date: Thu, 13 Apr 2023 02:20:11 +0200 Subject: [PATCH] =?UTF-8?q?Borrado=20en=20los=20pods=20en=20funci=C3=B3n?= =?UTF-8?q?=20del=20nivel=20de=20privacidad.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webapp/src/solidapi/solidAdapter.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/webapp/src/solidapi/solidAdapter.js b/webapp/src/solidapi/solidAdapter.js index b21f4b97..43c3c5f6 100644 --- a/webapp/src/solidapi/solidAdapter.js +++ b/webapp/src/solidapi/solidAdapter.js @@ -90,8 +90,15 @@ export async function removePlace(session,placeId){ // Si el lugar existe, eliminamos su archivo if (placeToDelete) { const basicUrl = session.info.webId?.split("/").slice(0, 3).join("/"); - const placeUrl = basicUrl.concat("/public", "/Places", "/" + placeToDelete.id + ".json"); - deleteData(session, placeUrl); + const placeUrl = basicUrl.concat("/private", "/Places", "/" + placeToDelete.id + ".json"); + + if (placeToDelete.privacy === "Public") { + deleteData(session, placeUrl); + const placeUrlPublic = basicUrl.concat("/public", "/Places", "/" + placeToDelete.id + ".json"); + deleteData(session, placeUrlPublic); + }else { + deleteData(session, placeUrl); + } } }