Skip to content

Commit

Permalink
Write docs. Remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaptoss committed Jul 8, 2024
1 parent 9db7220 commit 27113db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ docker-compose.yaml
docs/node_modules
docs/web_deploy
vendor/
configs
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,23 @@ Body:
```json
{
"nullifier": "0x0000000000000000000000000000000000000000000000000000000000000000",
"count": 2
"count": 2,
"infinity": true
}
```
Response:
```json
{
"referral": "kPRQYQUcWzW",
"usage_left": 2
"usage_left": 2,
"infinity": true
}
```

Parameters:
- `nullifier` - nullifier to create or edit referrals for
- `count` - number of referral usage
- `infinity` - specify if referrals code have unlimited usage count

### Local build

Expand Down
2 changes: 1 addition & 1 deletion internal/service/handlers/create_balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func CreateBalance(w http.ResponseWriter, r *http.Request) {
return
}

referral, err := ReferralsQ(r).FilterInactive().Get(req.Data.Attributes.ReferredBy) // infinite referrals allowed
referral, err := ReferralsQ(r).FilterInactive().Get(req.Data.Attributes.ReferredBy)
if err != nil {
Log(r).WithError(err).Error("Failed to get referral by ID")
ape.RenderErr(w, problems.InternalError())
Expand Down

0 comments on commit 27113db

Please sign in to comment.