40 lines
938 B
C#
40 lines
938 B
C#
|
|
using Scalar.AspNetCore;
|
|
using Microsoft.AspNetCore.OpenApi;
|
|
|
|
DataContext.Instance = new DataContext();
|
|
var groupId = "group.Wmk1UTVQTnh0Sjd6a0xiOGhnTnMzZlNkc2p2Q3c0SXJiQkU2eDlNU0hyTT0=";
|
|
SignalIntegration.Instance = new SignalIntegration("192.168.1.108", 8719, "+4367762751895");
|
|
await SignalIntegration.Instance.ListGroups();
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
// Add services to the container.
|
|
builder.Services.AddRazorPages();
|
|
builder.Services.AddOpenApi();
|
|
|
|
var app = builder.Build();
|
|
|
|
// Configure the HTTP request pipeline.
|
|
if (!app.Environment.IsDevelopment())
|
|
{
|
|
app.UseExceptionHandler("/Error");
|
|
}
|
|
else
|
|
{
|
|
app.MapOpenApi();
|
|
app.MapScalarApiReference();
|
|
}
|
|
|
|
app.UseRouting();
|
|
|
|
app.UseAuthorization();
|
|
|
|
app.MapStaticAssets();
|
|
app.MapRazorPages()
|
|
.WithStaticAssets();
|
|
|
|
app.Run();
|
|
|
|
//Console.WriteLine("Size: " + DataContext.Instance.Songs.Count());
|
|
//await SignalIntegration.Instance.ListGroups(); |