Fix
This commit is contained in:
parent
635c1c9c75
commit
697dd58b46
@ -25,7 +25,7 @@ public final class POSTServerGroups implements Handler<RoutingContext> {
|
||||
String image = requestBody.getString("image");
|
||||
|
||||
ServerGroup serverGroup = new ServerGroup(id, image);
|
||||
SyncUtils.<Void>runBlocking(v -> serverGroup.insert(v));
|
||||
SyncUtils.<Void>runBlocking(serverGroup::insert);
|
||||
|
||||
if (requestBody.containsKey("addedBy")) {
|
||||
AuditLog.log(UuidUtils.parseUuid(requestBody.getString("addedBy")), requestBody.getString("addedByIp"), ctx, AuditLogActionType.SERVER_GROUP_CREATE, ImmutableMap.of("serverGroupId", id), (ignored, error) -> {
|
||||
|
@ -75,14 +75,16 @@ public final class POSTServersHeartbeat implements Handler<RoutingContext> {
|
||||
private Future<Void> createInfoResponse(Server server, double tps, Map<UUID, String> playerNames) {
|
||||
Future<Void> callback = Future.future();
|
||||
|
||||
server.receivedHeartbeat(tps, playerNames.keySet());
|
||||
server.save((ignored, error) -> {
|
||||
if (error != null) {
|
||||
callback.fail(error);
|
||||
} else {
|
||||
callback.complete();
|
||||
}
|
||||
});
|
||||
if (server != null && playerNames != null) {
|
||||
server.receivedHeartbeat(tps, playerNames.keySet());
|
||||
server.save((ignored, error) -> {
|
||||
if (error != null) {
|
||||
callback.fail(error);
|
||||
} else {
|
||||
callback.complete();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return callback;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user