feat: migrate project secrets and user-scoped colors

This commit is contained in:
Gabriel20xx committed 2026-09-15 13:23:17 +02:00
1 parent dcfdb3d7af
commit 0e450d53de
9 files changed
+263 -7

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@ coreConfig.onUpdate((info) => authClient.setBaseUrl(info.authGuardUrl));
// in your own route for PUT /api/core-services/internal:
app.put('/api/core-services/internal', (req, res) => {
if (req.get('X-Internal-Auth') !== process.env.INTERNAL_SERVICE_SECRET) {
if (req.get('X-Internal-Auth') !== process.env.SECRET) {
return res.status(401).json({ error: 'internal service authentication required' });
}
const info = coreConfig.set(req.body);
+2 -2
View File
@@ -12,7 +12,7 @@
* Framework-agnostic: this module has no HTTP server of its own. A service
* wires the actual `PUT /api/core-services/internal` route in its own
* framework (Express, plain `http`, ...), gated behind its own
* INTERNAL_SERVICE_SECRET check the same way its other internal-service
* SECRET check the same way its other internal-service
* routes already are, decodes the JSON body with `Info.fromJSON`, and calls
* `store.set(info)` - see `Store.set`'s doc comment for a minimal Express
* example.
@@ -118,7 +118,7 @@ export class Store {
* the other value. Returns the resulting Info. Minimal Express usage:
*
* app.put('/api/core-services/internal', (req, res) => {
* if (req.get('X-Internal-Auth') !== process.env.INTERNAL_SERVICE_SECRET) {
* if (req.get('X-Internal-Auth') !== process.env.SECRET) {
* return res.status(401).json({ error: 'internal service authentication required' });
* }
* const info = coreConfigStore.set(Info.fromJSON(req.body));