removed the authored surveys property
removed the responses property
removed CreateAnswerDto&AnswerDto
This commit is contained in:
2025-01-26 13:28:40 +02:00
parent 78900ab7ad
commit 77fc9dfd92
22 changed files with 904 additions and 38 deletions

View File

@@ -5,21 +5,31 @@ using survey_beta.Models;
using survey_beta.Services;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container
builder.Services.AddDbContext<AppDbContext>(options =>
options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
var app = builder.Build();
// Configure the HTTP request pipeline.
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddIdentity<User, IdentityRole>()
.AddEntityFrameworkStores<AppDbContext>()
.AddDefaultTokenProviders();
builder.Services.AddScoped<UserService>();
builder.Services.AddScoped<UsersServices>();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.MapControllers();
app.UseHttpsRedirection();