return new GetTicketsAPI().execute();
}
@Override
public Result doExecute() throws DAOException, PartakeException {
UserEx user = ensureLogin();
String queryType = getParameter("queryType");
if (queryType == null)
queryType = "all";
int offset = optIntegerParameter("offset", 0);
offset = Util.ensureRange(offset, 0, Integer.MAX_VALUE);
int limit = optIntegerParameter("limit", 10);
limit = Util.ensureRange(limit, 0, 100);
GetEnrollmentsTransaction transaction = new GetEnrollmentsTransaction(user.getId(), queryType, offset, limit);
transaction.execute();
ArrayNode statuses = new ArrayNode(JsonNodeFactory.instance);
for (TicketAndStatus ticketAndStatus : transaction.getStatuses()) {
ObjectNode obj = new ObjectNode(JsonNodeFactory.instance);