fix(python): return months_to_show from the JSON API
Go returns months_to_show in /api/adults and /api/juniors; the Python API did not, so make parity failed on both routes. The Python HTML pages already had the feature. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+6
-2
@@ -179,7 +179,9 @@ def api_adults():
|
||||
datetime.now().strftime("%Y-%m"),
|
||||
attendance_url=attendance_url, payments_url=payments_url, bank_account=BANK_ACCOUNT,
|
||||
)
|
||||
return jsonify(_unwrap_view_model_for_api(vm))
|
||||
out = _unwrap_view_model_for_api(vm)
|
||||
out["months_to_show"] = MONTHS_TO_SHOW
|
||||
return jsonify(out)
|
||||
|
||||
@app.route("/api/juniors")
|
||||
def api_juniors():
|
||||
@@ -203,7 +205,9 @@ def api_juniors():
|
||||
datetime.now().strftime("%Y-%m"),
|
||||
attendance_url=attendance_url, payments_url=payments_url, bank_account=BANK_ACCOUNT,
|
||||
)
|
||||
return jsonify(_unwrap_view_model_for_api(vm))
|
||||
out = _unwrap_view_model_for_api(vm)
|
||||
out["months_to_show"] = MONTHS_TO_SHOW
|
||||
return jsonify(out)
|
||||
|
||||
@app.route("/api/payments")
|
||||
def api_payments():
|
||||
|
||||
Reference in New Issue
Block a user