mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-23 19:30:06 +02:00
feat: clan query implemented
This commit is contained in:
1 parent
8fb1b170df
commit
af747cf3f4
7 files changed
+97
-8
No files matched your search
@@ -139,5 +139,19 @@ namespace WotBlitzStatisticsPro.DataAccess
|
||||
|
||||
return collection.ToDictionary(n => n.typeId, n => n.typeValue);
|
||||
}
|
||||
|
||||
public async Task<Dictionary<string, string>> GetClanRoles(RequestLanguage language)
|
||||
{
|
||||
var collection = await _database.GetCollection<ClanRoleDictionary>(ClanRolesCollectionName)
|
||||
.Find(Builders<ClanRoleDictionary>.Filter.Empty)
|
||||
.Project(n => new
|
||||
{
|
||||
ClanRoleId = n.ClanRoleId,
|
||||
ClanRoleValueValue = n.ClanRoleNames.First(v => v.Language == language).Value
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
return collection.ToDictionary(n => n.ClanRoleId, n => n.ClanRoleValueValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user