♻️ Moved services & controllers to Pass
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
using DysonNetwork.Pass.Data;
|
||||
using DysonNetwork.Pass;
|
||||
using DysonNetwork.Pass.Account;
|
||||
using DysonNetwork.Pass.Auth;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
@ -8,15 +10,21 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllers();
|
||||
builder.Services.AddGrpc();
|
||||
builder.Services.AddDbContext<AppDatabase>(options =>
|
||||
options.UseNpgsql(builder.Configuration.GetConnectionString("App")));
|
||||
|
||||
builder.Services.AddScoped<AccountService>();
|
||||
builder.Services.AddScoped<AuthService>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
app.MapGrpcService<AccountGrpcService>();
|
||||
app.MapGrpcService<AuthGrpcService>();
|
||||
|
||||
// Run database migrations
|
||||
using (var scope = app.Services.CreateScope())
|
||||
|
Reference in New Issue
Block a user