Forum reward lookup (Marty 2026-11-10: 1 POL for an introduction, ongoing, linked wallet + payouts on): GET /api/forum/member?email= signed with the forum secret (HMAC of email.ts, 5-minute window) returns found/username/activated (member id > 0)/address/suspended for the earnerscorner.com reward service. qa/forumsso 17/17.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3952,6 +3952,15 @@ const server = http.createServer(async (req, res) => {
|
||||
}
|
||||
res.writeHead(302, baseHeaders(Object.assign({ Location: forumsso.FORUM_URL() + path, 'Cache-Control': 'no-store' }, set.length ? { 'Set-Cookie': set } : {}))); return res.end();
|
||||
}
|
||||
// Earners Corner introduction reward (Marty 2026-11-10: 0.1 POL, ongoing, linked wallet + payouts switched on): the forum's reward
|
||||
// service looks a member up here. Activated = an on-chain member id (the $20 start with payouts on); the address is the payout wallet.
|
||||
if (p === '/api/forum/member' && req.method === 'GET') {
|
||||
const email = String(u.searchParams.get('email') || '').toLowerCase();
|
||||
if (!forumsso.verifyServer(email, req.headers['x-forum-ts'], req.headers['x-forum-sig'])) return json(res, 401, { error: 'auth' });
|
||||
const a = await accounts.byEmail(email);
|
||||
if (!a) return json(res, 200, { found: false });
|
||||
return json(res, 200, { found: true, username: a.username || null, activated: Number(a.memberId) > 0, address: a.address || null, suspended: !!fraud.isSuspended(email) });
|
||||
}
|
||||
if (p === '/forum/invite' && req.method === 'GET') {
|
||||
const s = await auth.fromRequest(req);
|
||||
if (!s || !s.email) { res.writeHead(302, { Location: forumsso.FORUM_URL() + '/session/sso', 'Cache-Control': 'no-store' }); return res.end(); }
|
||||
|
||||
Reference in New Issue
Block a user