~netlandish/gobwebs-ses-feedback

3dce85c1d2aa0a3a1c8be2344eeea1d2d0c93ecb — Peter Sanchez 11 months ago 5486f04
Fixing bug where updated/creation date is set to zero at creation
1 files changed, 2 insertions(+), 2 deletions(-)

M email_notifications.go
M email_notifications.go => email_notifications.go +2 -2
@@ 64,8 64,8 @@ func (n *EmailNotification) Store(ctx context.Context) error {
		if n.ID == 0 {
			err = sq.
				Insert("email_notifications").
				Columns("email", "count", "notifications", "created_on", "updated_on").
				Values(n.Email, n.Count, n.Notifications, n.CreatedOn, n.UpdatedOn).
				Columns("email", "count", "notifications").
				Values(n.Email, n.Count, n.Notifications).
				Suffix(`RETURNING id, created_on, updated_on`).
				PlaceholderFormat(sq.Dollar).
				RunWith(tx).