feat: implemented HRDLog upload
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user