You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
APIPR or issue introducing/requiring modifications to the API codeBugPR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)
Describe the bug
New visits can't be added using PUT requests to the endpoint /candidates/{candidate}/{visit} using the correct request. It works with an incorrect request (see Additional context below for details).
3- The following command should work, but doesn't:
curl -X PUT -H "Authorization: Bearer $token" https://test-loris-dev.loris.ca/api/v0.0.3/candidates/115788/V1 -d '{"CandID":"115788","Visit":"V1","Site":"Rome","Battery":"Stale","Project":"Rye"}' returns an error.
What did you expect to happen?
The PUT request should return nothing. Go to https://<your-hostname>/api/v0.0.3/candidates/115788/, the visit V1 should be present, but is not.
Additional context curl -X PUT -H "Authorization: Bearer $token" https://test-loris-dev.loris.ca/api/v0.0.3/candidates/115788/V3 -d '{"CandID":"115788","Visit":"V1","Site":"Rome","Battery":"Stale","Project":"Rye"}' should fail, because the visit in the url should be V1. However, the PUT request works this way and V1 is added successfully
The text was updated successfully, but these errors were encountered:
spell00
added
Bug
PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)
API
PR or issue introducing/requiring modifications to the API code
labels
Oct 7, 2020
APIPR or issue introducing/requiring modifications to the API codeBugPR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)
Describe the bug
New visits can't be added using PUT requests to the endpoint
/candidates/{candidate}/{visit}
using the correct request. It works with an incorrect request (seeAdditional context
below for details).To Reproduce
Steps to reproduce the behavior:
1- Login using a POST request to the \login:
curl https://<your-hostname>/api/v0.0.3/login -d '{"username": "<your-username>", "password": "<your-password>"}'
2- Store the token in a variable.
~$ token='<a-really-long-string>'
3- The following command should work, but doesn't:
curl -X PUT -H "Authorization: Bearer $token" https://test-loris-dev.loris.ca/api/v0.0.3/candidates/115788/V1 -d '{"CandID":"115788","Visit":"V1","Site":"Rome","Battery":"Stale","Project":"Rye"}'
returns an error.What did you expect to happen?
The PUT request should return nothing. Go to
https://<your-hostname>/api/v0.0.3/candidates/115788/
, the visitV1
should be present, but is not.Additional context
curl -X PUT -H "Authorization: Bearer $token" https://test-loris-dev.loris.ca/api/v0.0.3/candidates/115788/V3 -d '{"CandID":"115788","Visit":"V1","Site":"Rome","Battery":"Stale","Project":"Rye"}'
should fail, because the visit in the url should beV1
. However, the PUT request works this way andV1
is added successfullyThe text was updated successfully, but these errors were encountered: