acdh-oeaw / apis-core

https://acdh-oeaw.github.io/apis-core/
MIT License
11 stars 3 forks source link

fix: fixes #392 #393

Closed gregorpirgie closed 1 year ago

gregorpirgie commented 1 year ago

Replaces fetching instances

This adds an automatic check for each endpoint if requested object is indeed instance of expected entity. Otherwise, redirects to 404 page.

Removes unused import.

gregorpirgie commented 1 year ago

Updated solution, see latest commit.

But instead of throwing 404, returns a HttpResponse with error message in plain text (thought this would be better for programmatic interaction with the endpoint(s)).