forked from retoor/devplacepy
feat: add per-user customization suppression toggles and API endpoints for profile
This commit is contained in:
@@ -131,4 +131,31 @@ CUSTOMIZATION_ACTIONS: tuple[Action, ...] = (
|
||||
),
|
||||
),
|
||||
),
|
||||
Action(
|
||||
name="customize_set_enabled",
|
||||
method="LOCAL",
|
||||
path="",
|
||||
summary="Show or suppress the user's customizations without deleting them",
|
||||
description=(
|
||||
"Toggles whether the user's saved customizations render, keeping the stored code intact. "
|
||||
"category='global' controls the site-wide customizations; category='pagetype' controls every "
|
||||
"per-page-type customization at once. enabled=false hides them; enabled=true shows them again. "
|
||||
"Mirrors the toggle buttons on the user's profile page."
|
||||
),
|
||||
handler="customization",
|
||||
requires_auth=True,
|
||||
params=(
|
||||
arg(
|
||||
"category",
|
||||
"Which set to toggle: 'global' (whole site) or 'pagetype' (all per-page customizations).",
|
||||
required=True,
|
||||
),
|
||||
arg(
|
||||
"enabled",
|
||||
"true to show the customizations, false to suppress them.",
|
||||
required=True,
|
||||
kind="boolean",
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user