24 lines
547 B
C#
24 lines
547 B
C#
|
|
using FreeTubeSync;
|
||
|
|
using FreeTubeSync.Database;
|
||
|
|
using FreeTubeSync.EndPoints;
|
||
|
|
|
||
|
|
var builder = WebApplication.CreateBuilder(args);
|
||
|
|
|
||
|
|
builder.Services.AddEndpointsApiExplorer();
|
||
|
|
builder.Services.AddSwaggerGen();
|
||
|
|
|
||
|
|
builder.Services.AddDbContext<DataContext>();
|
||
|
|
|
||
|
|
builder.Services.AddScoped(typeof(IRepository<>), typeof(Repository<>));
|
||
|
|
|
||
|
|
// Add services to the container.
|
||
|
|
|
||
|
|
var app = builder.Build();
|
||
|
|
|
||
|
|
app.MapHistoryEndpoints();
|
||
|
|
app.MapPlaylistEndpoints();
|
||
|
|
app.MapProfileEndpoints();
|
||
|
|
app.MapSearchHistoryEndpoints();
|
||
|
|
app.MapSettingEndpoints();
|
||
|
|
|
||
|
|
app.Run();
|