mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-29 16:10:07 +00:00
fix(atlas): share the wish form and tour figures, mark the people reads
- lint:dup: the add-a-wish form state and the tour figures of the hub were written twice, once per view; they live in useWishAddForm and tourHubFigures now, and both views read them. - lint:tx: AtlasPeopleService.profile only writes through the region cache refreshes of the Atlas reads it calls, each complete on its own, so it is marked @txStandalone.
This commit is contained in:
@@ -99,6 +99,14 @@ export class AtlasPeopleService {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* One traveller's counts and badges, read through the Atlas reads the user's
|
||||
* own Atlas uses.
|
||||
*
|
||||
* @txStandalone its only writes are those reads' region cache refreshes, each
|
||||
* complete on its own and safe to repeat, so nothing a caller does around
|
||||
* them needs to share their transaction.
|
||||
*/
|
||||
private async profile(id: number): Promise<{ person: Omit<AtlasPerson, 'badges'>; badges: Badge[] }> {
|
||||
const stats = await this.atlas.stats(id);
|
||||
const visited = (stats.countries as Array<{ code: string; status?: string; firstVisit?: string | null }>).filter(
|
||||
|
||||
Reference in New Issue
Block a user