Created
October 4, 2018 01:11
-
-
Save vmussak/e894644e0798a8196fba699ccf86f266 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function inserirCliente(req, res) { | |
let clienteDb = await repository.verificaExisteCliente(req.body.cpf); | |
if (clienteDb) | |
return res.error('Já existe um cliente com esse CPF', 406); | |
let cliente = await repository.inserirCliente(req.body); | |
await _atualizarReconhecimentoFacial(cliente, req.body.novaImagem); | |
res.ok(cliente); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment