Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.