Skip to content

feat(admin): add authenticated settings API endpoints#690

Open
Ferryx349 wants to merge 5 commits into
cameri:mainfrom
Ferryx349:settings-api
Open

feat(admin): add authenticated settings API endpoints#690
Ferryx349 wants to merge 5 commits into
cameri:mainfrom
Ferryx349:settings-api

Conversation

@Ferryx349

Copy link
Copy Markdown
Collaborator

Description

Adds backend-only admin settings endpoints that reuse the shared settings-config module from #672, so the admin console can read and update relay settings without duplicating CLI logic.

Why

The admin settings editor needs the same get/set/validate behavior as the CLI. This PR exposes that through authenticated admin routes ahead of the UI work in #594.

Related Issue

Fixes- Part of #665

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Non-functional change (docs, style, minor refactor)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my code changes.
  • I added a changeset, or this is docs-only and I added an empty changeset.
  • All new and existing tests passed.

@changeset-bot

changeset-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cc5c7b3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nostream Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread src/routes/admin/index.ts
router.get('/session', adminRateLimitMiddleware, adminAuthMiddleware, withAdminController(createGetAdminSessionController))
router.get('/health', adminRateLimitMiddleware, adminAuthMiddleware, withAdminController(createGetAdminHealthController))
router.get('/metrics', adminRateLimitMiddleware, adminAuthMiddleware, withAdminController(createGetAdminMetricsController))
router.get('/settings', adminRateLimitMiddleware, adminAuthMiddleware, withAdminController(createGetAdminSettingsController))
Comment thread src/routes/admin/index.ts
router.get(
'/settings/schema',
adminRateLimitMiddleware,
adminAuthMiddleware,
Comment thread src/routes/admin/index.ts
adminAuthMiddleware,
withAdminController(createGetAdminSettingsSchemaController),
)
router.patch('/settings', adminRateLimitMiddleware, adminAuthMiddleware, json(), withAdminController(createPatchAdminSettingsController))
Comment thread src/routes/admin/index.ts
router.post(
'/settings/validate',
adminRateLimitMiddleware,
adminAuthMiddleware,
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

Coverage is 68.718%Ferryx349:settings-api into cameri:main. No base build found for cameri:main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants