diff --git a/Procfile b/Procfile index 4f5d6fbe..0ee32c89 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: chmod a+x .github/scripts/decrypt_key.sh && ./.github/scripts/decrypt_key.sh && chmod a+x .github/scripts/decrypt_develop_key.sh && ./.github/scripts/decrypt_develop_key.sh && java -jar -Dserver.port=$PORT build/libs/webservice-2.0.2.jar +web: chmod a+x .github/scripts/decrypt_key.sh && ./.github/scripts/decrypt_key.sh && chmod a+x .github/scripts/decrypt_develop_key.sh && ./.github/scripts/decrypt_develop_key.sh && java -jar -Dserver.port=$PORT build/libs/webservice-2.0.3.jar diff --git a/README.md b/README.md index 92c4c69d..e1aba24f 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,4 @@ Software project from FIB (Facultat d'Informàtica de Barcelona) ## Documentation Documentation for the current release: - - [Webservice Javadoc](https://javadoc.jitpack.io/com/github/Grupo13-PES-Mascotas/PES_My-Pet-Care-Webservice/v2.0.2/javadoc/) + - [Webservice Javadoc](https://javadoc.jitpack.io/com/github/Grupo13-PES-Mascotas/PES_My-Pet-Care-Webservice/v2.0.3/javadoc/) diff --git a/build.gradle b/build.gradle index 90adec9a..5c28ae76 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ plugins { } group = 'com.github.Grupo13-PES-Mascotas' -version = '2.0.2' +version = '2.0.3' sourceCompatibility = '1.8' configurations { diff --git a/src/main/java/org/pesmypetcare/webservice/dao/communitymanager/GroupDaoImpl.java b/src/main/java/org/pesmypetcare/webservice/dao/communitymanager/GroupDaoImpl.java index 7d722a02..20a93c95 100644 --- a/src/main/java/org/pesmypetcare/webservice/dao/communitymanager/GroupDaoImpl.java +++ b/src/main/java/org/pesmypetcare/webservice/dao/communitymanager/GroupDaoImpl.java @@ -249,7 +249,9 @@ private void deleteUserFromMember(String groupId, String userUid, WriteBatch bat private void deleteGroupIcon(String id) throws DatabaseAccessException, DocumentException { String path = (String) documentAdapter .getDocumentField(Path.ofDocument(Collections.groups, id), FieldPath.of("icon", "path")); - storageDao.deleteImageByName(path); + if (path != null) { + storageDao.deleteImageByName(path); + } } /** diff --git a/src/main/java/org/pesmypetcare/webservice/dao/usermanager/UserDaoImpl.java b/src/main/java/org/pesmypetcare/webservice/dao/usermanager/UserDaoImpl.java index d36b328c..452ef314 100644 --- a/src/main/java/org/pesmypetcare/webservice/dao/usermanager/UserDaoImpl.java +++ b/src/main/java/org/pesmypetcare/webservice/dao/usermanager/UserDaoImpl.java @@ -95,9 +95,9 @@ public void createUser(String uid, UserEntity userEntity) throws DatabaseAccessE public void deleteFromDatabase(String uid) throws DatabaseAccessException, DocumentException { DocumentSnapshot userDoc = getDocumentSnapshot(users, uid); throwExceptionIfUserDoesNotExist(userDoc); - petDao.deleteAllPets(uid); - deleteUserStorage(uid); String username = (String) userDoc.get(USERNAME_FIELD); + petDao.deleteAllPets(username); + deleteUserStorage(uid); WriteBatch batch = collectionAdapter.batch(); deleteUserLikes(username, batch); collectionAdapter.commitBatch(batch);