up
This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"hamlog/internal/db"
|
||||
)
|
||||
|
||||
// Station is a radio / TRX line. The display Name is also what gets
|
||||
@@ -190,8 +192,8 @@ func (r *Repo) SaveStation(ctx context.Context, s *Station) error {
|
||||
_, err := r.db.ExecContext(ctx,
|
||||
`UPDATE operating_stations
|
||||
SET name = ?, tx_pwr = ?, sort_order = ?,
|
||||
updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now')
|
||||
WHERE id = ?`, s.Name, pwr, s.SortOrder, s.ID)
|
||||
updated_at = ?
|
||||
WHERE id = ?`, s.Name, pwr, s.SortOrder, db.NowISO(), s.ID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("update station: %w", err)
|
||||
}
|
||||
@@ -230,8 +232,8 @@ func (r *Repo) SaveAntenna(ctx context.Context, a *Antenna) error {
|
||||
if _, err := tx.ExecContext(ctx,
|
||||
`UPDATE operating_antennas
|
||||
SET name = ?, sort_order = ?,
|
||||
updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now')
|
||||
WHERE id = ?`, a.Name, a.SortOrder, a.ID); err != nil {
|
||||
updated_at = ?
|
||||
WHERE id = ?`, a.Name, a.SortOrder, db.NowISO(), a.ID); err != nil {
|
||||
return fmt.Errorf("update antenna: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user