Browse Source

Update set folder API

Vishnu Mohandas 5 years ago
parent
commit
6721d22c97
1 changed files with 2 additions and 3 deletions
  1. 2 3
      lib/folder_service.dart

+ 2 - 3
lib/folder_service.dart

@@ -160,8 +160,8 @@ class FolderSharingService {
       final users = (response.data["users"] as List).toList();
       final result = Map<int, bool>();
       for (final user in users) {
-        if (user != Configuration.instance.getUsername()) {
-          result[user] = folder.sharedWith.contains(user);
+        if (user["id"] != Configuration.instance.getUserID()) {
+          result[user["id"]] = folder.sharedWith.contains(user["id"]);
         }
       }
       return result;
@@ -169,7 +169,6 @@ class FolderSharingService {
   }
 
   Future<void> updateFolder(Folder folder) {
-    log("Updating folder: " + folder.toString());
     return _dio
         .put(Configuration.instance.getHttpEndpoint() + "/folders/",
             options: Options(