The /find/ endpoint will now truncate the given URL to the minimal part that still contains the ID of the submission.
It then tries to find the submission with a startswith filter.
This greatly simplifies the logic, because we don't have to handle transcriptions separately anymore.
Additionally we can handle more types of URLs, for example claim/done comments can be found now.
Transcriptions not being found has also been fixed.
The only downside is that it might be slower, because we cannot use simple equality checks anymore.
Personally, I think this is worth it.
Relevant issue: Closes #234
Description:
The
/find/
endpoint will now truncate the given URL to the minimal part that still contains the ID of the submission. It then tries to find the submission with astartswith
filter.This greatly simplifies the logic, because we don't have to handle transcriptions separately anymore. Additionally we can handle more types of URLs, for example
claim
/done
comments can be found now. Transcriptions not being found has also been fixed.The only downside is that it might be slower, because we cannot use simple equality checks anymore. Personally, I think this is worth it.
Checklist: