feat(go): M5.2 — HTTP handlers for /api/adults, /api/juniors, /api/payments, /api/version #17
Reference in New Issue
Block a user
Delete Branch "feat/go-m5-2-api-handlers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
/api/*routes, composingservices/membership.Sources+ domain reconciliation into the M5.1 wire typesbuildAdultsResponse/buildJuniorsResponse/buildPaymentsResponseare byte-for-byte ports ofscripts/views.pyview-model builders, laying the foundation for M5.4 parity testing"?"fee sentinel for 1-session attendance,:NJ,MAattendance breakdown string, skip-unknown months in totals and settled balanceFeeData,MonthData,Transaction) to carry raw sheet columns needed for the wire representation; no breaking changes to existing logicFiles changed
go/internal/web/api/handler.go—Handlerstruct,ServeAdults,ServeJuniors,ServePayments,ServeVersiongo/internal/web/api/build_common.go— shared helpers:getMonthLabels,groupRawPaymentsByPerson,settledBalance, converters,ensureSlicego/internal/web/api/build_adults.go—buildAdultsResponse+buildAdultMemberRowgo/internal/web/api/build_juniors.go—buildJuniorsResponse+buildJuniorMemberRowgo/internal/web/api/build_payments.go—buildPaymentsResponsewith Unmatched bucketgo/internal/domain/reconcile/reconcile.go— extendedFeeData,MonthData,Transactiongo/internal/services/membership/sources.go— export merged months, populate new FeeData/Transaction fieldsgo/internal/web/server.go+go/cmd/fuj/main.go— wire sources+cfg, register routesTest plan
go test ./...passes (all packages green)golangci-lint run ./...passes with no issuesGET /api/versionreturns build info JSONGET /api/adultsreturnsAdultsResponsematching Python/adultsJSON shapeGET /api/juniorsreturnsJuniorsResponsematching Python/juniorsJSON shapeGET /api/paymentsreturnsPaymentsResponsewith grouped payments and Unmatched bucket🤖 Generated with Claude Code