Spooky Doors: doors may repeat a visit campaign after doorRepeatDays (7) via visit_repeat; Earn and refuels stay once-ever
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -105,6 +105,13 @@ try {
|
||||
const o2 = (await api('/api/door/open?t=' + encodeURIComponent(mint({ kind: 'door', memberId: 77, email: player, nonce: n2, ret: SD + '/play?door=' + n2 })))).j;
|
||||
ok(o2 && o2.none && o2.why === 'empty' && o2.ret === SD + '/play?door=' + n2 + '&none=1', 'nothing to serve -> ret&none=1', JSON.stringify(o2));
|
||||
|
||||
// 2b. doors may repeat a campaign after doorRepeatDays (0 here = no cooldown): the same pack is served again
|
||||
await api('/api/admin/rates', { method: 'PATCH', data: { doorRepeatDays: 0 } }, adminH);
|
||||
const n2b = crypto.randomBytes(12).toString('hex');
|
||||
const o2b = (await api('/api/door/open?t=' + encodeURIComponent(mint({ kind: 'door', memberId: 77, email: player, nonce: n2b, ret: SD + '/play?door=' + n2b })))).j;
|
||||
ok(o2b && o2b.mode === 'visit', 'after the cooldown a door repeats an already-visited pack', JSON.stringify(o2b));
|
||||
await api('/api/admin/rates', { method: 'PATCH', data: { doorRepeatDays: 7 } }, adminH);
|
||||
|
||||
// 3. the kinds stay separate: one door used, refuel cap 1 still open, Earn visits untouched
|
||||
const nr = crypto.randomBytes(12).toString('hex');
|
||||
const rf = (await api('/api/refuel/open?t=' + encodeURIComponent(mint({ kind: 'refuel', memberId: 77, email: player, nonce: nr, ret: SD + '/play?refuel=' + nr }, DRSECRET)))).j;
|
||||
|
||||
Reference in New Issue
Block a user