mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 18:37:18 +02:00
feat: deictionary query implemented
This commit is contained in:
1 parent
3e4f34ca16
commit
8a9f2f7077
21 files changed
+972
-69
No files matched your search
@@ -4,21 +4,29 @@ using System.Threading.Tasks;
|
||||
using HotChocolate.Types;
|
||||
using WotBlitzStatisticsPro.Common.Model;
|
||||
using WotBlitzStatisticsPro.Logic;
|
||||
using WotBlitzStatisticsPro.DataAccess;
|
||||
|
||||
namespace WotBlitzStatisticsPro.GraphQl.Query
|
||||
{
|
||||
[ExtendObjectType(Name = "Query")]
|
||||
public class VehiclesQuery
|
||||
{
|
||||
private readonly IWargamingDictionaries _dictionaries;
|
||||
|
||||
public VehiclesQuery(IWargamingDictionaries dictionariesDataAccessor)
|
||||
{
|
||||
_dictionaries = dictionariesDataAccessor;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of all vehicles of one nation
|
||||
/// </summary>
|
||||
/// <param name="nationId">Nation</param>
|
||||
/// <param name="language">Request language</param>
|
||||
/// <returns>A list of vehicles</returns>
|
||||
public async Task<List<VehicleResponse>> GetVehicles(string nationId, RequestLanguage? language)
|
||||
public Task<List<VehicleResponse>?> GetVehicles(string nationId, RequestLanguage? language)
|
||||
{
|
||||
return new List<VehicleResponse>();
|
||||
return _dictionaries.GetVehiclesByNation(nationId, language);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user