Respond to POST /punishments with raw punishment

This commit is contained in:
Colin McDonald 2016-10-26 21:01:17 -04:00
parent 884e1fd7dd
commit 508674045e

View File

@ -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
));
} }
} }