Open plakitkelly opened 2 months ago
@plakitkelly please add the order reference here.
@MariusJulius @KaarelKa
BE PR: https://github.com/keeleinstituut/tv-translation-order/pull/137
I had to change the API so we will need to make some changes on FE also.
The logic of how it works is described in Swagger docs:
@KaarelKa needs FE? https://dev.tolkevarav.eki.ee/projects/9c50dbb8-f253-427d-aff0-afdd5077075b my PIC
@kadmit Hey, I did the changes on FE, the request now works, but there seems to be a permissions issue. I'm currently logged in as the translation manager of a project, but I get error 403, when trying to download the review file
@KaarelKa
I found that currently, FE is doing requests wrongly. Here are the things that should be fixed to allow review files to be downloadable:
reference_object_id
- should not be the project ID but the ID of the corresponding review (project.reviews.*.id
).reference_object_type
- should be review
instead of project
.collection
- will remain the same (review
).Example of the request:
curl 'https://dev.tolkevarav.eki.ee/gateway/translation-order/api/media/download?id=3175&reference_object_id=9bd43982-0a3d-4ddb-9646-6d4e299d5853&reference_object_type=review&collection=review' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9,ru;q=0.8' \
-H 'cache-control: no-cache' \
-H 'cookie: session-expires=1719319908; appSession.0={session ID}' \
-H 'pragma: no-cache' \
-H 'priority: u=1, i' \
-H 'referer: https://dev.tolkevarav.eki.ee/projects/9bd43785-5fba-4a93-a346-a3224cda883b' \
-H 'sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36'
All users (client, pm, main user)
By clicking on downloading button, user sees Teadmata viga: 404