Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
46f9535b4a | |||
acb15df909 | |||
7c2fccb79e |
@ -1,7 +1,7 @@
|
||||
using API.Models;
|
||||
using AuthorizationService.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace API;
|
||||
namespace AuthorizationService;
|
||||
|
||||
public class AppDBContext(DbContextOptions<AppDBContext> options) : DbContext(options)
|
||||
{
|
@ -1,9 +1,9 @@
|
||||
using API.Models;
|
||||
using API.Persistence.Repositories;
|
||||
using AuthorizationService.Models;
|
||||
using AuthorizationService.Persistence.Repositories;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace API.Application.Users.Commands
|
||||
namespace AuthorizationService.Application.Users.Commands
|
||||
{
|
||||
public class CreateUser
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
using API.Models;
|
||||
using API.Persistence.Repositories;
|
||||
using AuthorizationService.Models;
|
||||
using AuthorizationService.Persistence.Repositories;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace API.Application.Users.Commands
|
||||
namespace AuthorizationService.Application.Users.Commands
|
||||
{
|
||||
public class DeleteUser
|
||||
{
|
@ -1,5 +1,5 @@
|
||||
using API.Models;
|
||||
using API.Persistence.Repositories;
|
||||
using AuthorizationService.Models;
|
||||
using AuthorizationService.Persistence.Repositories;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
@ -9,7 +9,7 @@ using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
|
||||
namespace API.Application.Users.Commands
|
||||
namespace AuthorizationService.Application.Users.Commands
|
||||
{
|
||||
public class LoginUser
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
using API.Models;
|
||||
using API.Persistence.Repositories;
|
||||
using AuthorizationService.Models;
|
||||
using AuthorizationService.Persistence.Repositories;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace API.Application.Users.Commands
|
||||
namespace AuthorizationService.Application.Users.Commands
|
||||
{
|
||||
public class UpdateUser
|
||||
{
|
@ -1,9 +1,9 @@
|
||||
using API.Models;
|
||||
using API.Persistence.Repositories;
|
||||
using AuthorizationService.Models;
|
||||
using AuthorizationService.Persistence.Repositories;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace API.Application.Users.Commands
|
||||
namespace AuthorizationService.Application.Users.Commands
|
||||
{
|
||||
public class UpdateUserPassword
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
using API.Models;
|
||||
using API.Persistence.Repositories;
|
||||
using AuthorizationService.Models;
|
||||
using AuthorizationService.Persistence.Repositories;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace API.Application.Users.Queries
|
||||
namespace AuthorizationService.Application.Users.Queries
|
||||
{
|
||||
public class QueryAllUsers
|
||||
{
|
@ -1,9 +1,9 @@
|
||||
using API.Models;
|
||||
using API.Persistence.Repositories;
|
||||
using AuthorizationService.Models;
|
||||
using AuthorizationService.Persistence.Repositories;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.VisualStudio.Web.CodeGenerators.Mvc.Templates.BlazorIdentity.Pages.Manage;
|
||||
|
||||
namespace API.Application.Users.Queries
|
||||
namespace AuthorizationService.Application.Users.Queries
|
||||
{
|
||||
public class QueryUserById
|
||||
{
|
@ -9,7 +9,7 @@
|
||||
<WebStackScaffolding_IsPartialViewSelected>False</WebStackScaffolding_IsPartialViewSelected>
|
||||
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
|
||||
<WebStackScaffolding_LayoutPageFile />
|
||||
<WebStackScaffolding_DbContextTypeFullName>API.AppDBContext</WebStackScaffolding_DbContextTypeFullName>
|
||||
<WebStackScaffolding_DbContextTypeFullName>AuthorizationService.AppDBContext</WebStackScaffolding_DbContextTypeFullName>
|
||||
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34511.84
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "API", "API.csproj", "{5DF9B7D8-FA4E-4209-A677-C4CF4886D4B3}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthorizationService", "AuthorizationService.csproj", "{5DF9B7D8-FA4E-4209-A677-C4CF4886D4B3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace API.Controllers
|
||||
namespace AuthorizationService.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
@ -1,6 +1,6 @@
|
||||
using API.Application.Users.Commands;
|
||||
using API.Application.Users.Queries;
|
||||
using API.Models;
|
||||
using AuthorizationService.Application.Users.Commands;
|
||||
using AuthorizationService.Application.Users.Queries;
|
||||
using AuthorizationService.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
@ -10,7 +10,7 @@ using System.Security.Claims;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace API.Controllers
|
||||
namespace AuthorizationService.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
@ -9,17 +9,17 @@ EXPOSE 8081
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
WORKDIR /src
|
||||
COPY ["API.csproj", "."]
|
||||
RUN dotnet restore "./././API.csproj"
|
||||
COPY ["AuthorizationService.csproj", "."]
|
||||
RUN dotnet restore "./././AuthorizationService.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/."
|
||||
RUN dotnet build "./API.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||
RUN dotnet build "./AuthorizationService.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
RUN dotnet publish "./API.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||
RUN dotnet publish "./AuthorizationService.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "API.dll"]
|
||||
ENTRYPOINT ["dotnet", "AuthorizationService.dll"]
|
@ -1,5 +1,5 @@
|
||||
// <auto-generated />
|
||||
using API;
|
||||
using AuthorizationService;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
@ -7,7 +7,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace API.Migrations
|
||||
namespace AuthorizationService.Migrations
|
||||
{
|
||||
[DbContext(typeof(AppDBContext))]
|
||||
[Migration("20240812084720_CreateUser")]
|
||||
@ -19,7 +19,7 @@ namespace API.Migrations
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "9.0.0-preview.6.24327.4");
|
||||
|
||||
modelBuilder.Entity("API.Models.User", b =>
|
||||
modelBuilder.Entity("AuthorizationService.Models.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
@ -2,7 +2,7 @@
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace API.Migrations
|
||||
namespace AuthorizationService.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class CreateUser : Migration
|
@ -1,6 +1,6 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using API;
|
||||
using AuthorizationService;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace API.Migrations
|
||||
namespace AuthorizationService.Migrations
|
||||
{
|
||||
[DbContext(typeof(AppDBContext))]
|
||||
[Migration("20240813075158_ChangedUserWithGuid")]
|
||||
@ -20,7 +20,7 @@ namespace API.Migrations
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.7");
|
||||
|
||||
modelBuilder.Entity("API.Models.User", b =>
|
||||
modelBuilder.Entity("AuthorizationService.Models.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace API.Migrations
|
||||
namespace AuthorizationService.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ChangedUserWithGuid : Migration
|
@ -1,6 +1,6 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using API;
|
||||
using AuthorizationService;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace API.Migrations
|
||||
namespace AuthorizationService.Migrations
|
||||
{
|
||||
[DbContext(typeof(AppDBContext))]
|
||||
[Migration("20240813112418_NoMoreGuid")]
|
||||
@ -20,7 +20,7 @@ namespace API.Migrations
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.7");
|
||||
|
||||
modelBuilder.Entity("API.Models.User", b =>
|
||||
modelBuilder.Entity("AuthorizationService.Models.User", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("TEXT");
|
@ -2,7 +2,7 @@
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace API.Migrations
|
||||
namespace AuthorizationService.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class NoMoreGuid : Migration
|
@ -1,13 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using API;
|
||||
using AuthorizationService;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace API.Migrations
|
||||
namespace AuthorizationService.Migrations
|
||||
{
|
||||
[DbContext(typeof(AppDBContext))]
|
||||
partial class AppDBContextModelSnapshot : ModelSnapshot
|
||||
@ -17,7 +17,7 @@ namespace API.Migrations
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.7");
|
||||
|
||||
modelBuilder.Entity("API.Models.User", b =>
|
||||
modelBuilder.Entity("AuthorizationService.Models.User", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("TEXT");
|
@ -1,4 +1,4 @@
|
||||
namespace API.Models
|
||||
namespace AuthorizationService.Models
|
||||
{
|
||||
public class BaseModel
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace API.Models;
|
||||
namespace AuthorizationService.Models;
|
||||
|
||||
public class User : BaseModel
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using API.Models;
|
||||
using AuthorizationService.Models;
|
||||
|
||||
namespace API.Persistence.Repositories
|
||||
namespace AuthorizationService.Persistence.Repositories
|
||||
{
|
||||
public interface IUserRepository
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
using API.Models;
|
||||
using AuthorizationService.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.VisualStudio.Web.CodeGenerators.Mvc.Templates.BlazorIdentity.Pages;
|
||||
|
||||
namespace API.Persistence.Repositories
|
||||
namespace AuthorizationService.Persistence.Repositories
|
||||
{
|
||||
public class UserRepository(AppDBContext context) : IUserRepository
|
||||
{
|
@ -1,13 +1,13 @@
|
||||
using API.Application.Users.Commands;
|
||||
using API.Application.Users.Queries;
|
||||
using API.Persistence.Repositories;
|
||||
using AuthorizationService.Application.Users.Commands;
|
||||
using AuthorizationService.Application.Users.Queries;
|
||||
using AuthorizationService.Persistence.Repositories;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using System.Text;
|
||||
|
||||
namespace API
|
||||
namespace AuthorizationService
|
||||
{
|
||||
public class Program
|
||||
{
|
@ -7,7 +7,7 @@ Environment=DOTNET_ROOT=/home/reimar/.dotnet
|
||||
Environment=PATH=$PATH:/home/reimar/.dotnet
|
||||
Environment=DEFAULT_CONNECTION="Data Source=/home/reimar/skantravels/database.sqlite3"
|
||||
ExecStartPre=/home/reimar/skantravels/efbundle
|
||||
ExecStart=/home/reimar/skantravels/API --urls=http://0.0.0.0:5001
|
||||
ExecStart=/home/reimar/skantravels/AuthorizationService --urls=http://0.0.0.0:5001
|
||||
Type=simple
|
||||
|
||||
[Install]
|
Loading…
Reference in New Issue
Block a user