mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[cas] use http client factory
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Kruzya.TelegramBot.CombotAntiSpam.Combot;
|
||||
using Kruzya.TelegramBot.Core;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
|
||||
namespace Kruzya.TelegramBot.CombotAntiSpam;
|
||||
|
||||
@@ -12,6 +13,9 @@ public class CombotAntiSpam : Module
|
||||
|
||||
public override void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<ICombotClient, CombotClient>();
|
||||
services.AddHttpClient<ICombotClient, CombotClient>(c =>
|
||||
{
|
||||
c.BaseAddress = new Uri("https://api.cas.chat/check");
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user