Skip to content
Snippets Groups Projects
Commit 8412b567 authored by Cain, Payton David's avatar Cain, Payton David
Browse files

Read updated record by id

parent 830a25b9
No related branches found
No related tags found
2 merge requests!146Release CMO metadata to production,!73Return metadata from PUT
......@@ -86,11 +86,11 @@ async def get_metadata_by_id(id: int):
return meta[0]
@router.put("/metadata/{id}")
@router.put("/metadata/{id}", response_model=Metadata)
async def update_metadata(
id: int,
metadata: Metadata = Body(...),
user: User = Depends(require_user([os.getenv("REVIEWER_GROUP", "reviewer")])),
) -> Metadata:
):
await metadata_table.update_metadata(metadata)
return metadata
return get_metadata_by_id(metadata.id)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment