Daily login bonus (streak) + solo-ad budget default
- Daily login bonus: once/day, base 5 credits + gentle streak (+1/day, cap +5) for consecutive days; granted after sign-in, toast + cha-ching. New login_day/login_streak on earned_credits; /api/my/login-bonus. - Solo ad: selecting Solo now defaults Budget to 50 credits (5cr x 10 min deliveries) so entering 10 isn't rejected after submit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -715,6 +715,12 @@ const server = http.createServer(async (req, res) => {
|
||||
accounts.touchSeen(s.email).catch(() => {});
|
||||
return json(res, 200, { ok: true, chatUnread: await messages.chatUnread(s.email) });
|
||||
}
|
||||
// daily login bonus (once/day, gentle streak) — granted after the login flow
|
||||
if (p === '/api/my/login-bonus' && req.method === 'POST') {
|
||||
const s = await auth.fromRequest(req);
|
||||
if (!s || !s.email) return json(res, 401, { error: 'Sign in first.' });
|
||||
return json(res, 200, await ads.grantLoginBonus(s.email));
|
||||
}
|
||||
// -- rehearsal test-POL faucet: top a connected wallet up to 10 test-POL
|
||||
// (anvil_setBalance, no key needed). Rehearsal-only, rate-limited.
|
||||
if (p === '/api/my/faucet' && req.method === 'POST') {
|
||||
|
||||
Reference in New Issue
Block a user