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 20, 2023
1 parent a50ac97 commit 22e1da0
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 @@ -27,6 +27,7 @@
request_search_args,
request_view_args,
)
from invenio_records_resources.resources.records.headers import etag_headers
from invenio_records_resources.resources.records.utils import search_preference

from .errors import RedirectException
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 22e1da0

Please sign in to comment.