Skip to content

Commit aef9597

Browse files
committed
Added "startingTokens" attribute to the UsersController class that represents the number of tokens a new user gets. Currently set to 100.
1 parent 0e831d2 commit aef9597

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

FFOracle/Controllers/Public/UsersController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ public class UsersController : ControllerBase
1313
private readonly Client _supabase;
1414
private readonly SupabaseAuthService _authService;
1515

16+
private readonly int startingTokens = 100; //the number of tokens a new user gets to start
17+
1618
public UsersController(Client supabase, SupabaseAuthService authService)
1719
{
1820
_supabase = supabase;
@@ -48,7 +50,7 @@ public async Task<IActionResult> SignUp([FromBody] SignUpRequest req)
4850
Fullname = string.IsNullOrWhiteSpace(req.Fullname) ? null : req.Fullname,
4951
PhoneNumber = string.IsNullOrWhiteSpace(req.PhoneNumber) ? null : req.PhoneNumber,
5052
AllowEmails = req.AllowEmails,
51-
TokensLeft = 1, // user starts with 1 free token
53+
TokensLeft = startingTokens
5254
};
5355

5456
await _supabase.From<Models.Supabase.User>().Insert(user);

0 commit comments

Comments
 (0)