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
1 changed files with 2 additions and 8 deletions

View File

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