How would it look like this:
const responseGet = await api.get(rest of the code…
const userName = response.data.data.name;
const response = await api.put(
/contrato-assinados/${contract1},
{
data: {
data: new Date().toISOString(),
usuario_ids: [userName + userId],
status: 7,
contrato_ids: id,
hashBlockChain: tx.hash,
hashDocumento: confirmationToken,
},
},
{
headers: {
Authorization: Bearer ${token},
},
}
);
?
I’m a junior developer, so they gave me this super responsibility