-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add export functionality. Cleanup http requests.
- Loading branch information
Showing
20 changed files
with
608 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# test the api works | ||
|
||
GET {{url}}/v1/service/version | ||
Content-Type: application/json | ||
|
||
> {% | ||
client.global.set("new_user_email", ""); | ||
client.global.set("txm_event_name", ""); | ||
client.global.set("second_factor", ""); | ||
%} | ||
|
||
### | ||
POST {{url}}/v1/user/login | ||
Content-Type: application/json | ||
|
||
{ | ||
"email": "{{email}}", | ||
"password": "{{password}}" | ||
} | ||
|
||
> {% client.global.set("auth_token", response.body["auth_token"]); %} | ||
|
||
### | ||
|
||
POST {{url}}/v1/user/otp | ||
Content-Type: application/json | ||
Authorization: Bearer {{auth_token}} | ||
|
||
{ | ||
"otp": "" | ||
} | ||
|
||
> {% client.global.set("auth_token", response.body["auth_token"]); %} | ||
|
||
### | ||
|
||
|
||
POST {{url}}/v1/user/register | ||
Content-Type: application/json | ||
Authorization: Bearer {{auth_token}} | ||
|
||
{ | ||
"email": {{new_user_email}}, | ||
"password": "supersecretpasswordthatwillbechangedanyway", | ||
"role": "EDITOR", | ||
"second_factor": {{second_factor}}, | ||
"allowed_countries": [ | ||
"BEL" | ||
], | ||
"require_second_factor": true | ||
} | ||
|
||
### | ||
|
||
GET {{url}}/v1/user/{{new_user_email}}/reset-password-token | ||
Content-Type: application/json | ||
Authorization: Bearer {{auth_token}} | ||
|
||
> {% | ||
client.log("Change password page for " + client.global.get("new_user_email") + " has a format https://txmatching.ikem.cz/#/reset-password/" + response.body["token"]) %} | ||
|
||
### |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# The workflow to change user password | ||
|
||
GET {{url}}/v1/service/version | ||
Content-Type: application/json | ||
|
||
> {% | ||
client.global.set("change_password_email", "demo@example.com"); | ||
client.global.set("new_password", "demo@example.com"); | ||
%} | ||
|
||
### Registrer demo user | ||
|
||
POST {{url}}/v1/user/login | ||
Content-Type: application/json | ||
|
||
{ | ||
"email": "{{email}}", | ||
"password": "{{password}}" | ||
} | ||
|
||
> {% client.global.set("admin_auth_token", response.body["auth_token"]); %} | ||
|
||
### Demo user is ready now, lets generate reset password link | ||
|
||
GET {{url}}/v1/user/{{change_password_email}}/reset-password-token | ||
Content-Type: application/json | ||
Authorization: Bearer {{admin_auth_token}} | ||
|
||
> {% | ||
client.log("Change password page for " + client.global.get("change_password_email") + " has a format: " + client.global.get("url")+ "/#/reset-password/" + response.body["token"]) | ||
client.global.set("change_password_token", response.body["token"]); | ||
%} | ||
|
||
### | ||
|
||
PUT {{url}}/v1/user/reset-password | ||
Content-Type: application/json | ||
|
||
{ | ||
"token": {{change_password_token}}, | ||
"password": "bag2r" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
GET {{url}}/v1/service/version | ||
Content-Type: application/json | ||
|
||
|
||
### | ||
POST {{url}}/v1/user/login | ||
Content-Type: application/json | ||
|
||
{ | ||
"email": "{{email}}", | ||
"password": "{{password}}" | ||
} | ||
|
||
> {% client.global.set("auth_token", response.body["auth_token"]); %} | ||
|
||
### | ||
|
||
|
||
POST {{url}}/v1/txm-event/2/export | ||
Content-Type: application/json | ||
Authorization: Bearer {{auth_token}} | ||
|
||
|
||
{ | ||
"country": "CZE", | ||
"new_txm_event_name": "test2" | ||
} | ||
|
||
|
||
### | ||
POST {{url}}/v1/user/login | ||
Content-Type: application/json | ||
|
||
{ | ||
"email": "{{service_username}}", | ||
"password": "{{service_password}}" | ||
} | ||
|
||
> {% client.global.set("auth_token", response.body["auth_token"]); %} | ||
|
||
### | ||
PUT {{url}}/v1/public/patient-upload | ||
Authorization: Bearer {{auth_token}} | ||
Content-Type: application/json | ||
|
||
< tmp.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.