Respond to POST /punishments with raw punishment
This commit is contained in:
parent
884e1fd7dd
commit
508674045e
|
@ -125,17 +125,11 @@ public final class POSTPunishments implements Handler<RoutingContext> {
|
|||
if (error != null) {
|
||||
ErrorUtils.respondInternalError(ctx, error);
|
||||
} else {
|
||||
APIv3.respondJson(ctx, 200, ImmutableMap.of(
|
||||
"punishment", punishment,
|
||||
"accessDenialReason", accessDenialReason == null ? "" : accessDenialReason
|
||||
));
|
||||
APIv3.respondJson(ctx, 200, punishment);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
APIv3.respondJson(ctx, 200, ImmutableMap.of(
|
||||
"punishment", punishment,
|
||||
"accessDenialReason", accessDenialReason == null ? "" : accessDenialReason
|
||||
));
|
||||
APIv3.respondJson(ctx, 200, punishment);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue