Canapin
(Coin-coin le Canapin)
1. März 2023 um 23:50
5
Das Konzept existiert und die Schaltflächen heißen „Aktivieren“ und „Deaktivieren“ in der Benutzeroberfläche von Discourse
Und es kann natürlich auch über die API erfolgen:
Sorry for the long wait. Busy day
So, you can indeed enable or disable a theme or a component with a simple API request.
You’ll have to create an API key with the right credentials and assign an admin user to it.
in your Discourse: admin panel → API → + New API Key
in the script you’ll use, as mentioned, do a PUT request on https://yourdiscourse.com/admin/themes/[id_theme] with the proper headers (see the authentication part on https://docs.discourse.org/ ) and a JSON body …
Ich spreche in meinem Beitrag sowohl von Themes als auch von Komponenten, aber anscheinend ist es für Themes etwas anders, daher muss ich meine Lösung korrigieren.
2 „Gefällt mir“