mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-24 20:00:05 +02:00
feat: achievements queries added
This commit is contained in:
1 parent
b4e28506ba
commit
310f46b1e7
18 files changed
+505
-45
No files matched your search
@@ -153,5 +153,21 @@ namespace WotBlitzStatisticsPro.DataAccess
|
||||
|
||||
return collection.ToDictionary(n => n.ClanRoleId, n => n.ClanRoleValueValue);
|
||||
}
|
||||
|
||||
public async Task<List<AchievementSectionDictionary>> GetAchievementSections()
|
||||
{
|
||||
var collection = await _database.GetCollection<AchievementSectionDictionary>(AchievementsSectionsCollectionName)
|
||||
.FindAsync(Builders<AchievementSectionDictionary>.Filter.Empty);
|
||||
return collection.ToList();
|
||||
}
|
||||
|
||||
public async Task<Dictionary<string, AchievementDictionary>> GetAchievements(string[] achievementIds)
|
||||
{
|
||||
var collection = await _database.GetCollection<AchievementDictionary>(AchievementsCollectionName)
|
||||
.Find(Builders<AchievementDictionary>.Filter.In(v => v.AchievementId, achievementIds))
|
||||
.ToListAsync();
|
||||
|
||||
return collection.ToDictionary(a => a.AchievementId, a => a);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user