Skip to content

Commit

Permalink
Borrado en los pods en función del nivel de privacidad.
Browse files Browse the repository at this point in the history
  • Loading branch information
uo283840 committed Apr 13, 2023
1 parent 47c8ee1 commit ae971ea
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions webapp/src/solidapi/solidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit ae971ea

Please sign in to comment.