Skip to content

Instantly share code, notes, and snippets.

@vmussak
Created October 4, 2018 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vmussak/e894644e0798a8196fba699ccf86f266 to your computer and use it in GitHub Desktop.
Save vmussak/e894644e0798a8196fba699ccf86f266 to your computer and use it in GitHub Desktop.
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