Update reporter contact on report update

This is as a complicated one because it involves merging contact
information in tricky cases.

I assume that phone should override email, primarily because setting up
phones is more tightly regulated. This may be a terrible assumption.

Issue: #13
This commit is contained in:
Eli Ribble 2026-05-21 18:44:28 +00:00
parent dcce7cda1c
commit 6175e1a811
No known key found for this signature in database
5 changed files with 139 additions and 30 deletions

View file

@ -13,7 +13,7 @@ import (
)
func ContactPhoneInsert(ctx context.Context, txn db.Ex, m model.ContactPhone) (model.ContactPhone, error) {
statement := table.ContactPhone.INSERT(table.ContactPhone.MutableColumns).
statement := table.ContactPhone.INSERT(table.ContactPhone.AllColumns).
MODEL(m).
RETURNING(table.ContactPhone.AllColumns)
return db.ExecuteOneTx[model.ContactPhone](ctx, txn, statement)