feat: Google Maps API key management in admin settings
- Backend: GET /settings/maps-key (public) + PATCH /settings/maps (protected) - Admin: sección para guardar/ver estado de la Maps API key - Flutter web carga la key dinámicamente desde el backend Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
39c4301d1b
commit
3e1632e776
@@ -29,6 +29,19 @@ export class SettingsController {
|
||||
return this.settings.updatePolicy(key, body.content);
|
||||
}
|
||||
|
||||
// Maps key
|
||||
@Get('maps-key')
|
||||
async getMapsKey() {
|
||||
const api_key = await this.settings.getMapsKey();
|
||||
return { configured: !!api_key, api_key: api_key ?? '' };
|
||||
}
|
||||
|
||||
@Patch('maps')
|
||||
@UseGuards(JwtAuthGuard) @ApiBearerAuth()
|
||||
saveMapsKey(@Body() body: { api_key: string }) {
|
||||
return this.settings.saveMapsKey(body.api_key);
|
||||
}
|
||||
|
||||
// Public policy pages
|
||||
@Get('policy/:key')
|
||||
async getPublicPolicy(@Param('key') key: string, @Res() res: Response) {
|
||||
|
||||
Reference in New Issue
Block a user