A simple Task Management backend application using Flask
These are the packages you need to install before running this application
pip install flask
pip install flask_sqlalchemy
pip install PyJWT
pip install datetime
To run the application type these in the terminal
. venv/bin/activate
export FLASK_APP=api.py
flask run
Import the collection inside this repository into your Postman app to test all the endpoints.
You can log in as default users with different access levels
-
admin username: admin password: admin
-
user username: Naufal password: password
Every endpoint is NOT accessible without logging in, except Create User and, of course, Login. After logging in, make sure to copy the access token returned, and paste it to x-access-token header in every endpoint
You can create a new user without logging in, but the new user will have "user" access level. However, admin can promote each user to have "admin" access level.
When logged in with "admin" access level, you will have access to most of the endpoints, including:
- Get All Task
- Create Task
- Revoke Task
- Delete Task
Users with "user" access level will only have access to these endpoints:
- Get All Task
- Get Task
- Reserve Task
- Get Reserved Task
- Complete Task