Skip to content
This repository has been archived by the owner on Oct 31, 2021. It is now read-only.

Commit

Permalink
Fixing beta code validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotcourant committed May 7, 2021
1 parent 2e1e5d6 commit 6d2b6cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (c *Controller) registerEndpoint(ctx iris.Context) {

beta, err = repository.ValidateBetaCode(c.getContext(ctx), *registerRequest.BetaCode)
if err != nil {
c.wrapAndReturnError(ctx, err, http.StatusBadRequest, "could not verify beta code")
c.wrapPgError(ctx, err, "could not verify beta code")
return
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/repository/unauthenticated.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (u *unauthenticatedRepo) UseBetaCode(ctx context.Context, betaId, usedBy ui
span := sentry.StartSpan(ctx, "Validate Beta Code")
defer span.Finish()
result, err := u.txn.ModelContext(span.Context(), &models.Beta{}).
Set(`"beta"."used_by_user_id" = ?`, usedBy).
Set(`"used_by_user_id" = ?`, usedBy).
Where(`"beta"."beta_id" = ?`, betaId).
Update()
if err != nil {
Expand Down

0 comments on commit 6d2b6cb

Please sign in to comment.