commit
162efd08f6
1 changed files with 4 additions and 1 deletions
|
|
@ -53,7 +53,10 @@ public class Mongo {
|
|||
String response = db.getCollection(collection).find(whereQuery).cursor().next().toJson();
|
||||
return new JSONObject(response);
|
||||
} catch (NoSuchElementException e) {
|
||||
if (collection.equals("user"))
|
||||
insertUser(id);
|
||||
else if (collection.equals("server"))
|
||||
insertGuild(id);
|
||||
String response2 = db.getCollection(collection).find(whereQuery).cursor().next().toJson();
|
||||
return new JSONObject(response2);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue