feat: add LoTW sync type support (QSL/QSO delta/full)
- Add syncType parameter to LoTW sync: 'qsl_delta', 'qsl_full', 'qso_delta', 'qso_full' - qsl_* = only confirmed QSOs (qso_qsl=yes) - qso_* = all QSOs confirmed+unconfirmed (qso_qsl=no) - delta = incremental sync with date filter - full = sync all records without date filter - Add getLastLoTWQSODate() for QSO-based incremental sync - Add sync type dropdown selector on QSO page - Update job queue service to handle sync types - Update API endpoint to accept syncType in request body Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -314,8 +314,9 @@ const app = new Elysia()
|
||||
* POST /api/lotw/sync
|
||||
* Queue a LoTW sync job (requires authentication)
|
||||
* Returns immediately with job ID
|
||||
* Body: { syncType?: 'qsl_delta' | 'qsl_full' | 'qso_delta' | 'qso_full' }
|
||||
*/
|
||||
.post('/api/lotw/sync', async ({ user, set }) => {
|
||||
.post('/api/lotw/sync', async ({ user, body, set }) => {
|
||||
if (!user) {
|
||||
logger.warn('/api/lotw/sync: Unauthorized access attempt');
|
||||
set.status = 401;
|
||||
@@ -323,7 +324,8 @@ const app = new Elysia()
|
||||
}
|
||||
|
||||
try {
|
||||
const result = await enqueueJob(user.id, 'lotw_sync');
|
||||
const { syncType = 'qsl_delta' } = body || {};
|
||||
const result = await enqueueJob(user.id, 'lotw_sync', { syncType });
|
||||
|
||||
if (!result.success && result.existingJob) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user