diff --git a/.github/workflows/AccountPipeline.yml b/.github/workflows/AccountPipeline.yml index 312c42a..7c1b26c 100644 --- a/.github/workflows/AccountPipeline.yml +++ b/.github/workflows/AccountPipeline.yml @@ -26,10 +26,12 @@ jobs: run: dotnet restore Backend/Tests/Account.Test/Account.Test.csproj - name: Build Account project run: dotnet build Backend/Account/Account.csproj --no-restore + - name: Build Account Test project + run: dotnet build Backend/Tests/Account.Test/Account.Test.csproj --no-restore - name: List test assembly path run: ls -la Backend/Tests/Account.Test/bin/Debug/net8.0/ - name: Run tests - run: dotnet test Backend/Tests/Account.Test/Account.Test.csproj --no-build --verbosity normal + run: dotnet test Backend/Tests/Account.Test/Account.Test.csproj --verbosity normal - name: Log in to DockerHub uses: docker/login-action@v1 diff --git a/Backend/Account/Services/AccountService.cs b/Backend/Account/Services/AccountService.cs index fecf750..f45e4d4 100644 --- a/Backend/Account/Services/AccountService.cs +++ b/Backend/Account/Services/AccountService.cs @@ -12,7 +12,7 @@ public class AccountService(DatabaseContext _accountDbContext, IConfiguration co private readonly AsyncRetryPolicy _dbRetryPolicy = Policy.Handle().WaitAndRetryAsync(3, i => TimeSpan.FromSeconds(10)); public async Task?> Login(LoginRequestDTO request) - { + { var account = await _accountDbContext.Accounts.FirstOrDefaultAsync(x => x.Email == request.email); if (account is null) return null; var authToken = AuthTokenGenerator.GenerateOwnAuthToken(account.AccId.ToString(),configuration);