}
@Override
public Result doExecute() throws DAOException, PartakeException {
ensureValidSessionToken();
UserEx user = ensureAdmin();
String targetUserId = getFormParameter("targetUserId");
boolean state = getBooleanParameter("targetState"); // true if administrator wants to ban
BanAPITransaction transaction = new BanAPITransaction(user.getId(), targetUserId, state);
User bannedUser = transaction.execute();
if (bannedUser == null) {
return renderInvalid(UserErrorCode.INVALID_ARGUMENT);
} else {
// Admin専用APIなのでtoSafeJSONの代わりにtoJSONを呼ぶ