Store Manager is a web application that helps store owners manage sales and product inventory records. This application is meant for use in a single store. Only the store admin can access this endpoint. Router used'api/v2/products' POST METHOD.
No access token required.The endpoint enables a user to view all the available products in the inventory. _Router used_'api/v2/products' GET METHOD.
No access token required.Enables a user to get a single product from the inventory. _Router used_'api/v2/products/1' GET METHOD
Only the store attendant is allowed to access this endpoint. Enables the store attendant to post a sale. _Router used_'api/v2/sales' POST METHOD
The endpoint allows the admin to get all the sale records posted by the store attendants.Only accessible by the admin. _Router used_'api/v2/sales' GET METHOD.
The endpoint is only accessible to the store attendant who created it and the store admin. Enables the two to get the sale record. _Router used-'api/v2/sales/1' GET METHOD.
- Open a repo in github
- Clone the repository into the local machine through the terminal by: git clone https://github.com/winniekariuki/Challenge3.git
- Create a virtual enviroment with the command $ virtualenv -p python3 env
- Activate the virtual enviroment with the command `Desktop/Challeng3/env/Scripts/activate`
- cd back into the Challeng3 where you include all your code related files.
- Install requirements $ pip install -r requirements.txt
The endpoints can be tested through the postman by sending the link gotten from the terminal after running the app with the their respective routers
To test if the tests pass you run the pytest command