fix(wanderer): offer the connection and run the watch where a trip switched Tours on

With Tours off for the instance, a trip that switched it on opened the wanderer
import, but Settings hid the connection and the watch cron never ran. The addon
feed now tells each user whether wanderer applies to them, and the watch looks
for every user who has Tours on somewhere; the others only take their turn.
This commit is contained in:
Maurice
2026-11-23 15:13:35 +01:00
parent c289541c43
commit 8b9de04960
6 changed files with 53 additions and 8 deletions
@@ -1,5 +1,6 @@
import { AddonsController } from '../../../src/nest/addons/addons.controller';
import type { AddonsService } from '../../../src/nest/addons/addons.service';
import type { User } from '../../../src/types';
import { describe, it, expect, vi } from 'vitest';
@@ -20,8 +21,8 @@ describe('AddonsController (parity with the legacy GET /api/addons route)', () =
const list = vi.fn().mockReturnValue(feed);
const svc = makeService({ list } as Partial<AddonsService>);
expect(await new AddonsController(svc).list()).toBe(feed);
expect(await new AddonsController(svc).list({ id: 4 } as User)).toBe(feed);
expect(list).toHaveBeenCalledTimes(1);
expect(list).toHaveBeenCalledWith();
expect(list).toHaveBeenCalledWith(4);
});
});