From 55878ca826589c08343262f9e18fe2841dcb75cc Mon Sep 17 00:00:00 2001 From: Sarah Roberts Date: Thu, 26 Jan 2023 16:21:56 -0700 Subject: [PATCH] CORE-1840: require the `paid` query parameter in the endpoint to add a single subscription --- internal/controllers/users.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/controllers/users.go b/internal/controllers/users.go index 7300594..3a5e104 100644 --- a/internal/controllers/users.go +++ b/internal/controllers/users.go @@ -323,8 +323,7 @@ func (s Server) UpdateSubscription(ctx echo.Context) error { return model.Error(ctx, "invalid plan name", http.StatusBadRequest) } - paid := false - paid, err := query.ValidateBooleanQueryParam(ctx, "paid", &paid) + paid, err := query.ValidateBooleanQueryParam(ctx, "paid", nil) if err != nil { return model.Error(ctx, err.Error(), http.StatusBadRequest) }