Skip to content

Commit

Permalink
feat(environment variable): edited environment variables (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
SwimmingRieux authored Aug 18, 2024
1 parent e402dd1 commit 64dc949
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion RelationshipAnalysis/.env.example

This file was deleted.

7 changes: 2 additions & 5 deletions RelationshipAnalysis/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
using RelationshipAnalysis.Services.UserPanelServices.Abstraction.AuthServices.Abstraction;
using RelationshipAnalysis.Settings.JWT;

Env.Load();
var builder = WebApplication.CreateBuilder(args);

builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

builder.Services.AddDbContext<ApplicationDbContext>(options =>
options.UseNpgsql( builder.Configuration["CONNECTION_STRING"]).UseLazyLoadingProxies());

builder.Services.AddSingleton<ICookieSetter, CookieSetter>()
.AddSingleton<IJwtTokenGenerator, JwtTokenGenerator>()
Expand All @@ -42,8 +42,6 @@
.AddScoped<IUserUpdateRolesService, UserUpdateRolesService>()
.AddScoped<IRoleReceiver, RoleReceiver>();

builder.Services.AddDbContext<ApplicationDbContext>(options =>
options.UseNpgsql( Environment.GetEnvironmentVariable("CONNECTION_STRING")).UseLazyLoadingProxies());

builder.Services.Configure<JwtSettings>(builder.Configuration.GetSection("Jwt"));
builder.Services.AddAutoMapper(typeof(UserUpdateInfoMapper));
Expand Down Expand Up @@ -81,7 +79,6 @@


var app = builder.Build();

if (app.Environment.IsDevelopment())
{
app.UseSwagger();
Expand Down

0 comments on commit 64dc949

Please sign in to comment.