Sync with master #685

Merged
greg6775 merged 13 commits from master into greg-dev 2021-07-21 23:20:14 +02:00
Showing only changes of commit 162efd08f6 - Show all commits

View file

@ -53,7 +53,10 @@ public class Mongo {
String response = db.getCollection(collection).find(whereQuery).cursor().next().toJson(); String response = db.getCollection(collection).find(whereQuery).cursor().next().toJson();
return new JSONObject(response); return new JSONObject(response);
} catch (NoSuchElementException e) { } catch (NoSuchElementException e) {
insertUser(id); if (collection.equals("user"))
insertUser(id);
else if (collection.equals("server"))
insertGuild(id);
String response2 = db.getCollection(collection).find(whereQuery).cursor().next().toJson(); String response2 = db.getCollection(collection).find(whereQuery).cursor().next().toJson();
return new JSONObject(response2); return new JSONObject(response2);
} }