Return the communication we create

...or else it'll be empty.
This commit is contained in:
Eli Ribble 2026-05-02 00:37:51 +00:00
parent 52d4c47e43
commit d6b664d84a
No known key found for this signature in database

View file

@ -14,7 +14,8 @@ import (
func CommunicationInsert(ctx context.Context, txn bob.Tx, m *model.Communication) (*model.Communication, error) {
m.Created = time.Now()
statement := table.Communication.INSERT(table.Communication.MutableColumns).
MODEL(m)
MODEL(m).
RETURNING(table.Communication.AllColumns)
return db.ExecuteOne[model.Communication](ctx, statement)
}
func CommunicationsFromOrganization(ctx context.Context, org_id int64) ([]*model.Communication, error) {