• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cameri / nostream / 30272417184

27 Jul 2026 01:53PM UTC coverage: 69.623% (+0.9%) from 68.718%
30272417184

push

github

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

* feat(admin): extract shared settings-config module for CLI and admin UI

Signed-off-by: ABHAY PANDEY <pandeyabhay967@gmail.com>

* fix(settings-config): harden path parsing against prototype pollution

Signed-off-by: ABHAY PANDEY <pandeyabhay967@gmail.com>

* feat(admin): add authenticated settings API endpoints

Signed-off-by: ABHAY PANDEY <pandeyabhay967@gmail.com>

* ci: retrigger checks

* fix(admin): improve settings persistence and validation

- Implement atomic writes and timestamped backups in saveSettings

- Fix array path validation for empty default schemas

- Filter unknown keys from merged settings in GET /admin/settings to prevent secret leaks

---------

Signed-off-by: ABHAY PANDEY <pandeyabhay967@gmail.com>
Co-authored-by: Ricardo Cabral <me@ricardocabral.io>

2290 of 3649 branches covered (62.76%)

Branch coverage included in aggregate %.

119 of 124 new or added lines in 12 files covered. (95.97%)

2 existing lines in 1 file now uncovered.

5198 of 7106 relevant lines covered (73.15%)

28.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.78
/src/controllers/admin/post-settings-validate-controller.ts
1
import { Request, Response } from 'express'
2

3
import { IController } from '../../@types/controllers'
4
import { loadMergedSettings, validateSettings } from '../../utils/settings-config'
2✔
5

6
export class PostAdminSettingsValidateController implements IController {
2✔
7
  public async handleRequest(_request: Request, response: Response): Promise<void> {
8
    const issues = validateSettings(loadMergedSettings())
1✔
9

10
    if (issues.length === 0) {
1!
11
      response.status(200).setHeader('content-type', 'application/json').send({ valid: true, issues: [] })
1✔
12
      return
1✔
13
    }
14

NEW
15
    response.status(200).setHeader('content-type', 'application/json').send({ valid: false, issues })
×
16
  }
17
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc