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:
@@ -7,6 +7,7 @@ import {
|
||||
authenticateUser,
|
||||
getUserById,
|
||||
updateLoTWCredentials,
|
||||
updateDCLCredentials,
|
||||
} from './services/auth.service.js';
|
||||
import {
|
||||
getUserQSOs,
|
||||
@@ -235,6 +236,40 @@ const app = new Elysia()
|
||||
}
|
||||
)
|
||||
|
||||
/**
|
||||
* PUT /api/auth/dcl-credentials
|
||||
* Update DCL credentials (requires authentication)
|
||||
*/
|
||||
.put(
|
||||
'/api/auth/dcl-credentials',
|
||||
async ({ user, body, set }) => {
|
||||
if (!user) {
|
||||
set.status = 401;
|
||||
return { success: false, error: 'Unauthorized' };
|
||||
}
|
||||
|
||||
try {
|
||||
await updateDCLCredentials(user.id, body.dclApiKey);
|
||||
|
||||
return {
|
||||
success: true,
|
||||
message: 'DCL credentials updated successfully',
|
||||
};
|
||||
} catch (error) {
|
||||
set.status = 500;
|
||||
return {
|
||||
success: false,
|
||||
error: 'Failed to update DCL credentials',
|
||||
};
|
||||
}
|
||||
},
|
||||
{
|
||||
body: t.Object({
|
||||
dclApiKey: t.String(),
|
||||
}),
|
||||
}
|
||||
)
|
||||
|
||||
/**
|
||||
* POST /api/lotw/sync
|
||||
* Queue a LoTW sync job (requires authentication)
|
||||
|
||||
Reference in New Issue
Block a user