[store] other use default client factory

This commit is contained in:
Andriy
2023-07-28 23:14:36 +03:00
parent 42509dcacd
commit 2a37b27bb4
6 changed files with 15 additions and 19 deletions
@@ -12,12 +12,10 @@ public class OBoobsService : AbstractNsfwService
private readonly HttpClient _httpClient;
public override StoreItem StoreItem { get; } = new("boobs", "Сиськи", 60, 30);
public OBoobsService(AllowNsfw allowNsfw) : base(allowNsfw)
public OBoobsService(AllowNsfw allowNsfw, IHttpClientFactory factory) : base(allowNsfw)
{
_httpClient = new HttpClient
{
BaseAddress = new Uri("http://api.oboobs.ru")
};
_httpClient = factory.CreateClient();
_httpClient.BaseAddress = new Uri("http://api.oboobs.ru");
}
public override async Task<RandomMedia> GetRandomMediaAsync()