- Users can create an account and log in.
- The users should be able to make maintenance or repairs request.
- An admin should be able to approve/reject a repair/maintenance request.
- The admin should be able to mark request as resolved once it is done.
- The admin should be able to view all maintenance/repairs requests on the application.
- The admin should be able to filter requests.
- The user can view all his/her requests.
HTTP Method | URI | Action |
---|---|---|
GET | /api/v2/requests/ | Admin retrieve list of requests |
PUT | /api/v2/auth/admin | Admin upgrade normal user to admin |
PUT | /api/v2/requests/[requestId]/resolve | Admin resolve request |
PUT | /api/v2/requests/[requestId]/approve | Admin approve request |
PUT | /api/v2/requests/[requestId]/disapprove | Admin disapprove request |
GET | /api/v2/requests/[request_id] | Retrieve a request |
POST | /api/v2/users/requests | Create a new request |
GET | /api/v2/users/requests | Get all user requests |
PUT | /api/v2/requests/[request_id] | Update an existing request |
DELETE | /api/v2/requests/[request_id] | Delete an existing request |
POST | /api/v2/auth/signup/ | Register a user |
POST | /api/v2/auth/login/ | Log in User |
GET | /api/v2/signout | Signout User |
1.Clone the repository git clone https://github.com/RuthNjeri/Maintenance-Tracker-Application.git
2.Create a virtual environment virtualenv project-env
3.Activate the virtual environmentsource project-env/bin/activate
and navigate to the application root folder /Maintenance-Tracker-Application
4.Install the requirements pip install requirements.txt
5.Create a database named maintenanceapp
using postgresql
6.Run the application python run.py
7.Test the endpoints using Postman
1.Clone the repository git clone https://github.com/RuthNjeri/Maintenance-Tracker-Application.git
2.Create a virtual environment virtualenv project-env
3.Activate the virtual environmentsource project-env/bin/activate
and navigate to the application root folder /Maintenance-Tracker-Application
4.Install the requirements pip install requirements.txt
5.Create a database named maintenanceapp
using postgresql
6.Test the application using the command pytest