feat(api): refresh Riot ID during background updates

This commit is contained in:
dahyeon committed 2026-07-25 09:08:29 -07:00
1 parent 9cd5850d43
commit e3f39fd8b8
6 files changed
+222 -24

No files matched your search

@@ -103,8 +103,19 @@ export class RiotAccountEnrichmentService {
);
if (!account) return 'failed';
let region = params.region;
if (!region) {
const CommunityModel =
await this.connectionService.getModel('community');
const community = await CommunityModel.findById(user.communityId)
.select({ riotRegion: 1 })
.lean()
.exec();
region = community?.riotRegion ?? DEFAULT_REGION;
}
const identity = await this.accountService.getByPuuid(params.puuid, {
region: params.region ?? DEFAULT_REGION,
region,
});
if (
identity.puuid !== params.puuid ||