forked from VictoryCTO/project-python-flask
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 06 Implement the profile route
- Loading branch information
1 parent
a9b78ed
commit 1f589ef
Showing
2 changed files
with
76 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -251,34 +251,43 @@ We are going to make six figure bet on you. You are going to put your career in | |
|
||
We deeply appreciate the time you are taking to ensure joining Victory is of benefit to all concerned (yourself, Victory and our clients). | ||
|
||
# API calls | ||
# Users in database (some have roles assigned, some don't) | ||
|
||
REGISTER | ||
Invoke-WebRequest -Uri http://127.0.0.1:5000/register -Method POST -Headers @{"Content-Type" = "application/json"} -Body '{"username":"Dev Userson", "email":"[email protected]", "password":"sosecure"}' | ||
See API call below titled "SHOW ALL USERS with ALL ROLES" | ||
|
||
Invoke-WebRequest -Uri http://127.0.0.1:5000/register -Method POST -Headers @{"Content-Type" = "application/json"} -Body '{"username":"Scott Swain", "email":"[email protected]", "password":"sosecure"}' | ||
Dev Userson | [email protected] | Active: False | Roles: ['Senior Dev/Getting Started'] | ||
Bruce Lee | [email protected] | Active: False | Roles: [] | ||
Scott Swain | [email protected] | Active: False | Roles: ['Dev/Getting Started'] | ||
|
||
Invoke-WebRequest -Uri http://127.0.0.1:5000/register -Method POST -Headers @{"Content-Type" = "application/json"} -Body '{"username":"Bozo Clown", "email":"[email protected]", "password":"sosecure"}' | ||
# API calls | ||
|
||
Invoke-WebRequest -Uri http://127.0.0.1:5000/register -Method POST -Headers @{"Content-Type" = "application/json"} -Body '{"username":"Bruce Lee", "email":"[email protected]", "password":"sosecure"}' | ||
Dev Userson | [email protected] | Active: False | Roles: ['Senior Dev/Getting Started'] | ||
Bruce Lee | [email protected] | Active: False | Roles: [] | ||
Scott Swain | [email protected] | Active: False | Roles: ['Dev/Getting Started'] | ||
|
||
REGISTER | ||
Invoke-WebRequest -Uri http://127.0.0.1:5000/register -Method POST -Headers @{"Content-Type" = "application/json"} -Body '{"username":"Bozo Clown", "email":"[email protected]", "password":"sosecure"}' | ||
|
||
LOGIN | ||
Invoke-WebRequest -Uri http://127.0.0.1:5000/login -Method POST -Headers @{"Content-Type" = "application/json"} -Body '{"email":"[email protected]", "password":"sosecure"}' | ||
|
||
TOGGLE ACTIVE | ||
Invoke-WebRequest -Uri http://127.0.0.1:5000/toggle-active -Method POST -Headers @{"Content-Type" = "application/json"} -Body '{"email":"[email protected]"}' | ||
|
||
SHOW USER PROFILE | ||
Invoke-WebRequest -Uri http://127.0.0.1:5000/profile -Method POST -Headers @{"Content-Type" = "application/json"} -Body '{"username":"Scott Swain", "email":""}' | ||
|
||
SHOW ALL USERS (deprecated to the next two calls) | ||
Invoke-WebRequest -Uri http://127.0.0.1:5000/users -Method GET -Headers @{"Content-Type" = "application/json"} | ||
|
||
SHOW ALL USERS with ROLES | ||
SHOW ALL USERS with ALL ROLES | ||
Invoke-WebRequest -Uri http://127.0.0.1:5000/users-roles -Method GET -Headers @{"Content-Type" = "application/json"} | ||
|
||
ACCESS REPORT | ||
Invoke-WebRequest -Uri http://127.0.0.1:5000/access-report -Method POST -Headers @{"Content-Type" = "application/json"} -Body '{"limit_to":"all_users"}' | ||
|
||
DELETE USER | ||
Invoke-WebRequest -Uri http://127.0.0.1:5000/delete-user -Method POST -Headers @{"Content-Type" = "application/json"} -Body '{"email":"scott@oceanmedia.net"}' | ||
Invoke-WebRequest -Uri http://127.0.0.1:5000/delete-user -Method POST -Headers @{"Content-Type" = "application/json"} -Body '{"email":"bozo@oceanmedia.net"}' | ||
|
||
CREATE ROLE(S) | ||
Invoke-WebRequest -Uri http://127.0.0.1:5000/create-roles -Method POST -Headers @{"Content-Type" = "application/json"} -Body '{"roles_depts":["Senior Dev,Getting Started", "Dev,Getting Started"]}' | ||
|
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