feat: implemented HRDLog upload

This commit is contained in:
2026-06-18 14:27:33 +02:00
parent e8eedcc1dc
commit cdd71b17c8
11 changed files with 333 additions and 8 deletions
+14
View File
@@ -491,6 +491,7 @@ var uploadStatusCols = map[string]bool{
"lotw_sent": true,
"qrzcom_qso_upload_status": true,
"clublog_qso_upload_status": true,
"hrdlog_qso_upload_status": true,
}
// ListForUpload returns QSOs whose per-service sent-status column equals
@@ -597,6 +598,19 @@ func (r *Repo) MarkClublogUploaded(ctx context.Context, id int64, date string) e
return nil
}
// MarkHRDLogUploaded stamps HRDLOG_QSO_UPLOAD_STATUS=Y and the upload date
// after a successful HRDLog.net push. date is an ADIF YYYYMMDD string.
func (r *Repo) MarkHRDLogUploaded(ctx context.Context, id int64, date string) error {
_, err := r.db.ExecContext(ctx,
`UPDATE qso SET hrdlog_qso_upload_status = 'Y', hrdlog_qso_upload_date = ?,
updated_at = ? WHERE id = ?`,
date, db.NowISO(), id)
if err != nil {
return fmt.Errorf("mark hrdlog uploaded %d: %w", id, err)
}
return nil
}
// MarkLoTWUploaded stamps LOTW_QSL_SENT=Y and the sent date after a
// successful TQSL upload. date is an ADIF YYYYMMDD string.
func (r *Repo) MarkLoTWUploaded(ctx context.Context, id int64, date string) error {