Changeset 9538edc
- Timestamp:
- 10/23/25 15:32:17 (11 months ago)
- Branches:
- master
- Children:
- e49c3ed
- Parents:
- 0b16523 (diff), c7d4a59 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - git-author:
- Stefan Saveski <76560180+stefansaveski@…> (10/23/25 15:32:17)
- git-committer:
- GitHub <noreply@…> (10/23/25 15:32:17)
- Location:
- iknow-api
- Files:
-
- 11 added
- 1 deleted
- 4 edited
-
Controllers/AuthController.cs (added)
-
Controllers/WeatherForecastController.cs (deleted)
-
DTOs/UserDTO.cs (added)
-
Data/AppDbContext.cs (added)
-
Migrations/20251022202014_InitialCreate.Designer.cs (added)
-
Migrations/20251022202014_InitialCreate.cs (added)
-
Migrations/AppDbContextModelSnapshot.cs (added)
-
Models/User.cs (added)
-
Program.cs (modified) (2 diffs)
-
Repository/Implementations/UserRepository.cs (added)
-
Repository/Interface/IUserRepository.cs (added)
-
Services/Implementations/AuthService.cs (added)
-
Services/Interfaces/IAuthService.cs (added)
-
appsettings.Development.json (modified) (1 diff)
-
appsettings.json (modified) (1 diff)
-
iknow-api.csproj (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
iknow-api/Program.cs
r0b16523 r9538edc 1 using Microsoft.EntityFrameworkCore; 2 using iknow_api.Core.Data; 3 using iknow_api.Services; 4 using iknow_api.Repositories; 5 1 6 var builder = WebApplication.CreateBuilder(args); 2 7 3 8 // Add services to the container. 9 builder.Services.AddControllers(); 10 builder.Services.AddOpenApi(); 4 11 5 builder.Services.AddControllers(); 6 // Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi 7 builder.Services.AddOpenApi(); 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 8 19 9 20 var app = builder.Build(); … … 16 27 17 28 app.UseHttpsRedirection(); 18 19 29 app.UseAuthorization(); 20 21 30 app.MapControllers(); 22 31 -
iknow-api/appsettings.Development.json
r0b16523 r9538edc 5 5 "Microsoft.AspNetCore": "Warning" 6 6 } 7 } 7 }, 8 "ConnectionStrings": { 9 "DefaultConnection": "Host=localhost;Port=5432;Database=myappdb;Username=postgres;Password=newpassword" 10 } 8 11 } -
iknow-api/appsettings.json
r0b16523 r9538edc 6 6 } 7 7 }, 8 "AllowedHosts": "*" 8 "ConnectionStrings": { 9 "DefaultConnection": "Host=localhost;Port=55432;Database=myappdb;Username=postgres;Password=newpassword" 10 }, 11 "Jwt": { 12 "Key": "YourSecretKeyHereMustBeAtLeast32CharactersLongForHS256Algorithm" 13 } 9 14 } -
iknow-api/iknow-api.csproj
r0b16523 r9538edc 9 9 10 10 <ItemGroup> 11 <PackageReference Include="BCrypt.Net-Next" Version="4.0.3" /> 11 12 <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" /> 12 19 </ItemGroup> 13 20
Note:
See TracChangeset
for help on using the changeset viewer.
