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");
|
String image = requestBody.getString("image");
|
||||||
|
|
||||||
ServerGroup serverGroup = new ServerGroup(id, image);
|
ServerGroup serverGroup = new ServerGroup(id, image);
|
||||||
SyncUtils.<Void>runBlocking(v -> serverGroup.insert(v));
|
SyncUtils.<Void>runBlocking(serverGroup::insert);
|
||||||
|
|
||||||
if (requestBody.containsKey("addedBy")) {
|
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) -> {
|
AuditLog.log(UuidUtils.parseUuid(requestBody.getString("addedBy")), requestBody.getString("addedByIp"), ctx, AuditLogActionType.SERVER_GROUP_CREATE, ImmutableMap.of("serverGroupId", id), (ignored, error) -> {
|
||||||
|
@ -75,6 +75,7 @@ public final class POSTServersHeartbeat implements Handler<RoutingContext> {
|
|||||||
private Future<Void> createInfoResponse(Server server, double tps, Map<UUID, String> playerNames) {
|
private Future<Void> createInfoResponse(Server server, double tps, Map<UUID, String> playerNames) {
|
||||||
Future<Void> callback = Future.future();
|
Future<Void> callback = Future.future();
|
||||||
|
|
||||||
|
if (server != null && playerNames != null) {
|
||||||
server.receivedHeartbeat(tps, playerNames.keySet());
|
server.receivedHeartbeat(tps, playerNames.keySet());
|
||||||
server.save((ignored, error) -> {
|
server.save((ignored, error) -> {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
@ -83,6 +84,7 @@ public final class POSTServersHeartbeat implements Handler<RoutingContext> {
|
|||||||
callback.complete();
|
callback.complete();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return callback;
|
return callback;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user