feat: the cart and the account ask for the customer's name
All checks were successful
Build and deploy / Validate source (push) Successful in 10s
Build and deploy / Integration suite on a real stack (push) Successful in 4m49s
Build and deploy / Secret scan and release gate (push) Successful in 8s
Build and deploy / Publish images (push) Successful in 1m15s
All checks were successful
Build and deploy / Validate source (push) Successful in 10s
Build and deploy / Integration suite on a real stack (push) Successful in 4m49s
Build and deploy / Secret scan and release gate (push) Successful in 8s
Build and deploy / Publish images (push) Successful in 1m15s
The Site asked only for CPF/CNPJ, WhatsApp and e-mail, so a person's Tiny contact was named after the recipient or the e-mail, and the WhatsApp notices the client's n8n sends from Tiny greeted "Olá, fulano@gmail.com". The cart's "Seus dados" and the signup now ask for a name, the account page can change it, and it names a CPF customer's Tiny contact (a CNPJ keeps the registry's razão social), the Kanban card and the team's alerts. Orders placed before have none, as the server still accepts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -256,12 +256,14 @@ def account_row(c, identity, lock=False):
|
||||
|
||||
@router.post('/api/account/profile')
|
||||
def update_profile(body: ProfileUpdate, identity=Depends(owner)):
|
||||
"""WhatsApp and the saved delivery address. The CPF or CNPJ is the account's and
|
||||
"""Name, WhatsApp and the saved delivery address. The CPF or CNPJ is the account's and
|
||||
does not change; the e-mail is the login and changes on its own route."""
|
||||
with db.connect() as c:
|
||||
row = account_row(c, identity, lock=True)
|
||||
profile = {**row['profile'], 'zap': body.zap,
|
||||
'address': body.address.model_dump() if body.address else None}
|
||||
if body.name is not None:
|
||||
profile['name'] = body.name
|
||||
c.execute('UPDATE dtf_local.accounts SET profile=%s WHERE id=%s', (Jsonb(profile), identity))
|
||||
audit('account_profile_updated', account=str(identity))
|
||||
return {'customer': profile}
|
||||
|
||||
Reference in New Issue
Block a user