feat: prepare database and UI for DCL integration

Add infrastructure for future DARC Community Logbook (DCL) integration:
- Database schema: Add dcl_api_key, my_darc_dok, darc_dok, dcl_qsl_rdate, dcl_qsl_rstatus fields
- Create DCL service stub with placeholder functions for when DCL provides API
- Backend API: Add /api/auth/dcl-credentials endpoint for API key management
- Frontend settings: Add DCL API key input with informational notice about API availability
- QSO table: Add My DOK and DOK columns, update confirmation column for multiple services

Note: DCL download API is not yet available. These changes prepare the application
for future implementation when DCL adds programmatic access.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-17 10:24:43 +01:00
parent 5db7f6b67f
commit 47738c68a9
10 changed files with 1014 additions and 24 deletions

View File

@@ -126,3 +126,19 @@ export async function updateLoTWCredentials(userId, lotwUsername, lotwPassword)
})
.where(eq(users.id, userId));
}
/**
* Update user's DCL API key
* @param {number} userId - User ID
* @param {string} dclApiKey - DCL API key
* @returns {Promise<void>}
*/
export async function updateDCLCredentials(userId, dclApiKey) {
await db
.update(users)
.set({
dclApiKey,
updatedAt: new Date(),
})
.where(eq(users.id, userId));
}