From 87179e589c4311828889ea718701f9af3dbd5929 Mon Sep 17 00:00:00 2001 From: wucm667 Date: Tue, 28 Apr 2026 19:50:19 +0800 Subject: [PATCH 1/2] fix(api): correct currency endpoint route from /currencies to /currency The route was registered as /api/v1/currencies (plural) but the documentation and swagger annotation specify /api/v1/currency (singular). This caused 404 errors when users called the documented endpoint. Fixes #1469 --- backend/app/api/routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/api/routes.go b/backend/app/api/routes.go index 47779bc4a..67f30ed75 100644 --- a/backend/app/api/routes.go +++ b/backend/app/api/routes.go @@ -80,7 +80,7 @@ func (a *app) mountRoutes(r *chi.Mux, chain *errchain.ErrChain, repos *repo.AllR BuildTime: buildTime, }))) - r.Get("/currencies", chain.ToHandlerFunc(v1Ctrl.HandleCurrency())) + r.Get("/currency", chain.ToHandlerFunc(v1Ctrl.HandleCurrency())) providers := []v1.AuthProvider{ providers.NewLocalProvider(a.services.User), From 6ad196ad2bbde08b8f67a20e1b837887c9339de3 Mon Sep 17 00:00:00 2001 From: wucm667 Date: Tue, 28 Apr 2026 20:01:27 +0800 Subject: [PATCH 2/2] fix(api): add backward-compatible /currencies alias for currency endpoint Frontend code still calls /api/v1/currencies (see group.ts line 172). Adding this alias prevents regressions while the frontend migrates to the documented /api/v1/currency endpoint. Suggested-by: CodeRabbit review --- backend/app/api/routes.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/app/api/routes.go b/backend/app/api/routes.go index 67f30ed75..f320098b9 100644 --- a/backend/app/api/routes.go +++ b/backend/app/api/routes.go @@ -81,6 +81,8 @@ func (a *app) mountRoutes(r *chi.Mux, chain *errchain.ErrChain, repos *repo.AllR }))) r.Get("/currency", chain.ToHandlerFunc(v1Ctrl.HandleCurrency())) + // Backward-compatible alias; remove after frontend migration to /currency. + r.Get("/currencies", chain.ToHandlerFunc(v1Ctrl.HandleCurrency())) providers := []v1.AuthProvider{ providers.NewLocalProvider(a.services.User),