From cd5095cdbb53ddb8c6184d6376571c3afc3c3812 Mon Sep 17 00:00:00 2001 From: Sean Date: Fri, 13 Jan 2023 12:04:17 -0700 Subject: [PATCH] Allow Last4 to be included when creating an Instrument in the DB --- pkg/repository/instrument.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/repository/instrument.go b/pkg/repository/instrument.go index 3b22176a..6a816bc6 100644 --- a/pkg/repository/instrument.go +++ b/pkg/repository/instrument.go @@ -32,8 +32,8 @@ func NewInstrument(db *sqlx.DB) Instrument { func (i instrument[T]) Create(insert model.Instrument) (model.Instrument, error) { m := model.Instrument{} rows, err := i.store.NamedQuery(` - INSERT INTO instrument (type, status, network, public_key, user_id) - VALUES(:type, :status, :network, :public_key, :user_id) RETURNING *`, insert) + INSERT INTO instrument (type, status, network, public_key, user_id, last_4) + VALUES(:type, :status, :network, :public_key, :user_id, :last_4) RETURNING *`, insert) if err != nil { return m, common.StringError(err) }