Changes in / [8e32210:c11d3a3]


Ignore:
Location:
iknow-api
Files:
1 added
11 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • iknow-api/Program.cs

    r8e32210 rc11d3a3  
    1 using Microsoft.EntityFrameworkCore;
    2 using iknow_api.Core.Data;
    3 using iknow_api.Services;
    4 using iknow_api.Repositories;
    5 
    61var builder = WebApplication.CreateBuilder(args);
    72
    83// Add services to the container.
     4
    95builder.Services.AddControllers();
     6// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
    107builder.Services.AddOpenApi();
    11 
    12 // Register DbContext
    13 builder.Services.AddDbContext<AppDbContext>(options =>
    14     options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
    15 
    16 // Register your services
    17 builder.Services.AddScoped<IAuthService, AuthService>();
    18 builder.Services.AddScoped<IUserRepository, UserRepository>(); // You'll need to add the UserRepository implementation
    198
    209var app = builder.Build();
    … …  
    2716
    2817app.UseHttpsRedirection();
     18
    2919app.UseAuthorization();
     20
    3021app.MapControllers();
    3122
  • iknow-api/appsettings.json

    r8e32210 rc11d3a3  
    66    }
    77  },
    8   "ConnectionStrings": {
    9     "DefaultConnection": "Host=localhost;Port=55432;Database=myappdb;Username=postgres;Password=REDACTED_ROTATE_ME"
    10   },
    11   "Jwt": {
    12     "Key": "REDACTED_SET_VIA_USER_SECRETS"
    13   }
     8  "AllowedHosts": "*"
    149}
  • iknow-api/iknow-api.csproj

    r8e32210 rc11d3a3  
    99
    1010  <ItemGroup>
    11     <PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
    1211    <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.9" />
    13     <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.10">
    14       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    15       <PrivateAssets>all</PrivateAssets>
    16     </PackageReference>
    17     <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
    18     <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.14.0" />
    1912  </ItemGroup>
    2013
Note: See TracChangeset for help on using the changeset viewer.