diff --git a/index.js b/index.js index eec2615..75cf524 100644 --- a/index.js +++ b/index.js @@ -131,6 +131,10 @@ import { broadcastActorUpdateController, lookupObjectController, } from "./lib/controllers/federation-mgmt.js"; +import { + settingsGetController, + settingsPostController, +} from "./lib/controllers/settings.js"; const defaults = { mountPath: "/activitypub", @@ -206,6 +210,11 @@ export default class ActivityPubEndpoint { text: "activitypub.federationMgmt.title", requiresDatabase: true, }, + { + href: `${this.options.mountPath}/admin/settings`, + text: "activitypub.settings.title", + requiresDatabase: true, + }, ]; } @@ -378,6 +387,10 @@ export default class ActivityPubEndpoint { router.post("/admin/federation/broadcast-actor", broadcastActorUpdateController(mp, this)); router.get("/admin/federation/lookup", lookupObjectController(mp, this)); + // Settings + router.get("/admin/settings", settingsGetController(mp)); + router.post("/admin/settings", settingsPostController(mp)); + return router; } diff --git a/locales/en.json b/locales/en.json index e5931d2..eb70b3c 100644 --- a/locales/en.json +++ b/locales/en.json @@ -333,6 +333,9 @@ "deleteSuccess": "Delete activity sent to followers", "deleteButton": "Delete from fediverse" }, + "settings": { + "title": "Settings" + }, "federationMgmt": { "title": "Federation", "collections": "Collection health",