This commit is contained in:
2026-06-14 00:55:27 +02:00
parent 08162fa126
commit 67203cd4a8
16 changed files with 897 additions and 212 deletions
+6 -4
View File
@@ -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)
}
}