Explorar o código

added ability to remove reports

Akira Laine %!s(int64=9) %!d(string=hai) anos
pai
achega
13cb49c175
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      app/server/server.js

+ 7 - 0
app/server/server.js

@@ -1285,6 +1285,13 @@ Meteor.methods({
         } else {
             throw new Meteor.Error(403, "Invalid permissions.");
         }
+    },
+    removeReport: function(query, obj){
+        if(isAdmin() && !isBanned()){
+            Reports.update(query, {$pull: {"report": obj}});
+        } else {
+            throw new Meteor.Error(403, "Invalid permissions.");
+        }
     }
 });