- $query = handleRequest($request, $ids);
- $success = $DB->update($query);
+ if ($request == 'block') {
+ // /add/(whitelist|blacklist)/(.+)
+ $query = handleRequest($util, $request, $ids);
+ $data = json_encode($query);
+ if ($util->isAdmin()) {
+ $method = '/add/blacklist';
+ } else {
+ $method = '/add/blacklist/' . $util->getUser();
+ }
+ $success = $util->makeRestCall($method, $data);
+ } else {
+ $query = handleRequest($util, $request, $ids);
+ $success = $DB->update($query);
+ }