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:
Lizandro Guarnizo
2026-06-27 07:59:19 -05:00
co-authored by Claude Sonnet 4.6
parent 39c4301d1b
commit 3e1632e776
3 changed files with 106 additions and 4 deletions
+13
View File
@@ -41,4 +41,17 @@ export class SettingsService {
]);
return { privacy, terms };
}
async getMapsKey(): Promise<string | null> {
const setting = await this.prisma.settings.findUnique({ where: { key: 'maps_config' } });
return (setting?.value as any)?.api_key ?? null;
}
async saveMapsKey(api_key: string) {
return this.prisma.settings.upsert({
where: { key: 'maps_config' },
create: { key: 'maps_config', value: { api_key } },
update: { value: { api_key } },
});
}
}