using Hotline.CallCenter.Tels;
using Microsoft.Extensions.DependencyInjection;

namespace Hotline.XingTang;
public static class ServiceCollectionExtensions
{
    public static IServiceCollection AddXingTangSDK(this IServiceCollection services)
    {
        services.AddScoped<ICallTelClient, CallTelClient>();
        return services;
    }

    //public static void UseXingTangApiEndpoints(this WebApplication app)
    //{
        // 注册 POST 接口
        //app.MapPost("/api/v1/XingTang/notify/status", async (INotifyService service, HttpContext context) =>
        //{
        //    var input = await context.Request.ReadFromJsonAsync<NotifyInDto>();
        //    await service.NotifyStatus(input!);
        //    return Results.Ok(new ApiResponse(0, "ok", ""));
        //});
    //}
}
