Skip to content

Commit

Permalink
resources: add etag headers
Browse files Browse the repository at this point in the history
  • Loading branch information
zzacharo committed Sep 21, 2023
1 parent a50ac97 commit 5212169
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion invenio_drafts_resources/resources/records/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
with_content_negotiation,
)
from invenio_records_resources.resources import RecordResource as RecordResourceBase
from invenio_records_resources.resources.records.headers import etag_headers
from invenio_records_resources.resources.records.resource import (
request_data,
request_extra_args,
Expand Down Expand Up @@ -164,7 +165,9 @@ def publish(self):

@request_view_args
@with_content_negotiation(
response_handlers={"application/json": ResponseHandler(JSONSerializer())},
response_handlers={
"application/json": ResponseHandler(JSONSerializer(), headers=etag_headers)
},
default_accept_mimetype="application/json",
)
@response_handler(many=True)
Expand Down

0 comments on commit 5212169

Please sign in to comment.