Skip to content

Commit

Permalink
CORE-1840: require the paid query parameter in the endpoint to add …
Browse files Browse the repository at this point in the history
…a single subscription
  • Loading branch information
slr71 committed Mar 27, 2023
1 parent 5a620d2 commit 55878ca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/controllers/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 55878ca

Please sign in to comment.