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) {
|
if (error != null) {
|
||||||
ErrorUtils.respondInternalError(ctx, error);
|
ErrorUtils.respondInternalError(ctx, error);
|
||||||
} else {
|
} else {
|
||||||
APIv3.respondJson(ctx, 200, ImmutableMap.of(
|
APIv3.respondJson(ctx, 200, punishment);
|
||||||
"punishment", punishment,
|
|
||||||
"accessDenialReason", accessDenialReason == null ? "" : accessDenialReason
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
APIv3.respondJson(ctx, 200, ImmutableMap.of(
|
APIv3.respondJson(ctx, 200, punishment);
|
||||||
"punishment", punishment,
|
|
||||||
"accessDenialReason", accessDenialReason == null ? "" : accessDenialReason
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user