Skip to content

Commit

Permalink
Merge pull request #51 from Brunobento1990/develop
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
Brunobento1990 authored Nov 2, 2024
2 parents d7cfd14 + a0e7758 commit 00e4ff1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions OpenAdm.Application/Dtos/Usuarios/CreateUsuarioDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void Validar()
throw new ExceptionApi("As senha não conferem!");
}

if(!string.IsNullOrWhiteSpace(Cpf) && !ValidarCnpjECpf.IsCpf(Cpf))
if (!string.IsNullOrWhiteSpace(Cpf) && !ValidarCnpjECpf.IsCpf(Cpf))
{
throw new ExceptionApi("CPF inválido!");
}
Expand All @@ -71,8 +71,8 @@ public Usuario ToEntity()
senha,
Nome,
Telefone,
Cnpj,
Cpf,
string.IsNullOrWhiteSpace(Cnpj) ? null : Cnpj,
string.IsNullOrWhiteSpace(Cpf) ? null : Cpf,
true);
}
}
2 changes: 1 addition & 1 deletion OpenAdm.Infra/Context/ParceiroContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class ParceiroContext(DbContextOptions options, IParceiroAutenticado parc
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseNpgsql(_parceiroAutenticado.StringConnection);
//optionsBuilder.UseNpgsql("User ID=postgres; Password=1234; Host=localhost; Port=4449; Database=open-adm-cliente; Pooling=true;");
//optionsBuilder.UseNpgsql("");
base.OnConfiguring(optionsBuilder);
}

Expand Down

0 comments on commit 00e4ff1

Please sign in to comment.