feat: migrate project secrets and user-scoped colors
This commit is contained in:
1 parent
dcfdb3d7af
commit
0e450d53de
9 files changed
+263
-7
No files matched your search
@@ -11,7 +11,7 @@ Framework-agnostic, like the rest of this package (see the top-level
|
||||
README's "HTTP framework adapters stay in each service" note): this module
|
||||
has no HTTP server of its own. A service wires the actual
|
||||
PUT /api/core-services/internal route in its own framework (FastAPI,
|
||||
aiohttp, ...), gated behind its own INTERNAL_SERVICE_SECRET check the same
|
||||
aiohttp, ...), gated behind its own SECRET check the same
|
||||
way its other internal-service routes already are, decodes the JSON body
|
||||
into an `Info`, and calls `Store.set(info)` -- see `Store.set`'s doc comment
|
||||
for a minimal FastAPI example.
|
||||
@@ -108,7 +108,7 @@ class Store:
|
||||
|
||||
@app.put("/api/core-services/internal")
|
||||
async def push_core_services(request: Request):
|
||||
if request.headers.get("X-Internal-Auth") != INTERNAL_SERVICE_SECRET:
|
||||
if request.headers.get("X-Internal-Auth") != SECRET:
|
||||
raise HTTPException(status_code=401)
|
||||
body = await request.json()
|
||||
info = core_config_store.set(Info.from_json(body))
|
||||
|
||||
Reference in new issue
Block a user