ServiceCollectionExtensions.cs 800 B

1234567891011121314151617181920212223
  1. using Hotline.CallCenter.Tels;
  2. using Microsoft.Extensions.DependencyInjection;
  3. namespace Hotline.XingTang;
  4. public static class ServiceCollectionExtensions
  5. {
  6. public static IServiceCollection AddXingTangSDK(this IServiceCollection services)
  7. {
  8. services.AddScoped<ICallTelClient, CallTelClient>();
  9. return services;
  10. }
  11. //public static void UseXingTangApiEndpoints(this WebApplication app)
  12. //{
  13. // 注册 POST 接口
  14. //app.MapPost("/api/v1/XingTang/notify/status", async (INotifyService service, HttpContext context) =>
  15. //{
  16. // var input = await context.Request.ReadFromJsonAsync<NotifyInDto>();
  17. // await service.NotifyStatus(input!);
  18. // return Results.Ok(new ApiResponse(0, "ok", ""));
  19. //});
  20. //}
  21. }