Add an admin switch for place enrichment

Reads fail-open, unlike the three older places_* switches. Those read
=== 'true', which is why migration 185 had to backfill a row on every existing
install; there is nothing here that warrants repeating that.

The three hand-rolled toggles next to it move to ToggleSwitch while I am in
there - they were bare buttons with an inline transform and no aria-pressed or
label, so a screen reader could not tell their state.
This commit is contained in:
Maurice
2026-08-09 22:31:39 +02:00
committed by Maurice
parent e9f9cfb5d5
commit f2368f86cf
57 changed files with 437 additions and 24 deletions
+10
View File
@@ -213,6 +213,16 @@ export class AdminController {
return result;
}
@Get('places-enrich')
getPlacesEnrich() { return this.admin.getPlacesEnrich(); }
@Put('places-enrich')
updatePlacesEnrich(@CurrentUser() user: User, @Body() body: AdminFeatureToggleDto, @Req() req: Request) {
const result = this.admin.updatePlacesEnrich(body.enabled);
this.audit.writeAudit({ userId: user.id, action: 'admin.places_enrich', ip: getClientIp(req), details: { enabled: result.enabled } });
return result;
}
@Get('collab-features')
getCollabFeatures() { return this.addons.getCollabFeatures(); }