// GET /accounts/group public byte[] Group(HttpContext ctx) { var grouping = GroupBy.Parse(ctx.Request.QueryString.Value, out var code); switch (code) { case 200: return(Json(ctx, grouping.Execute())); case 404: return(NotFound(ctx)); default: return(BadRequest(ctx)); } }