Skip to content

Commit 348e8d0

Browse files
committed
fix(node)
- Include link metadata response headers when updating Nodes
1 parent ceacd56 commit 348e8d0

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/lsst/cmservice/routers/v2/nodes.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ async def update_node_resource(
177177
A Node's name, id, kind, or namespace may not be modified by this
178178
method, and attempts to do so will produce a 4XX client error.
179179
180-
This PATCH endpoint supports RFC6902 json-patch and RFCrequests.
180+
This PATCH endpoint supports RFC6902 json-patch requests.
181181
182182
Notes
183183
-----
@@ -232,5 +232,9 @@ async def update_node_resource(
232232
session.add(new_manifest_db)
233233
await session.commit()
234234

235-
# TODO response headers
235+
response.headers["Self"] = request.url_for("read_node_resource", node_name=new_manifest_db.id).__str__()
236+
response.headers["Campaign"] = request.url_for(
237+
"read_campaign_resource", campaign_name=new_manifest_db.namespace
238+
).__str__()
239+
236240
return new_manifest_db

0 commit comments

Comments
 (0)