From 671afd2915ce295309fc201d1d67f5b164f2c502 Mon Sep 17 00:00:00 2001 From: Dorian Date: Fri, 13 Feb 2026 21:57:17 +0000 Subject: [PATCH] fix: add GET /subscriptions endpoint to silence 404s The frontend calls GET /subscriptions but only GET /subscriptions/active existed. Add a root GET handler that returns the same data. Co-authored-by: Cursor --- backend/src/subscriptions/subscriptions.controller.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/src/subscriptions/subscriptions.controller.ts b/backend/src/subscriptions/subscriptions.controller.ts index ff623c4..1522e3d 100644 --- a/backend/src/subscriptions/subscriptions.controller.ts +++ b/backend/src/subscriptions/subscriptions.controller.ts @@ -60,6 +60,16 @@ export class SubscriptionsController { ); } + /** + * Get all subscriptions for the current user. + * The frontend calls GET /subscriptions and filters client-side. + */ + @Get() + @UseGuards(HybridAuthGuard) + async getSubscriptions(@User() user: RequestUser['user']) { + return await this.subscriptionsService.getActiveSubscriptions(user.id); + } + /** * Get the current user's active subscriptions. */