Skip to content

Commit

Permalink
fix: encrypt database config
Browse files Browse the repository at this point in the history
  • Loading branch information
Brunobento1990 committed Mar 2, 2024
1 parent 92841cc commit c58a5df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Mensageria/Infra/Factories/FactoryParceiroContext.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Mensageria.Domain.Interfaces;
using Domain.Pkg.Cryptography;
using Mensageria.Domain.Interfaces;
using Mensageria.Infra.Context;
using Mensageria.Infra.Interfaces;
using Microsoft.EntityFrameworkCore;
Expand All @@ -16,7 +17,8 @@ public FactoryParceiroContext(IConfiguracaoParceiroRepository configuracaoParcei

public async Task<ParceiroContext> CreateParceiroContextAsync(string referer)

Check warning on line 18 in Mensageria/Infra/Factories/FactoryParceiroContext.cs

View workflow job for this annotation

GitHub Actions / build

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 18 in Mensageria/Infra/Factories/FactoryParceiroContext.cs

View workflow job for this annotation

GitHub Actions / build

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
var connectionString = await _configuracaoParceiroRepository.GetConnectionStringParceiroAsync(referer);
var encrypt = _configuracaoParceiroRepository.GetConnectionStringParceiroAsync(referer).Result;
var connectionString = CryptographyGeneric.Decrypt(encrypt);

var optionsBuilderParceiro = new DbContextOptionsBuilder<ParceiroContext>();

Expand Down

0 comments on commit c58a5df

Please sign in to comment.