Update stuff

This commit is contained in:
~erin 2021-11-23 07:35:57 -05:00
parent 9df07bf3db
commit de2d00cce6
No known key found for this signature in database
GPG Key ID: DA70E064A8C70F44
2 changed files with 11 additions and 17 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
/target
/*_db
graph.png
Rocket.toml

View File

@ -9,22 +9,14 @@ A simple server for dealing with products & orders for the Catgirl Pharmacy.
- [x] Keep track of orders
- [x] Add page for managing orders
- [x] Return Json data
- [x] Use one API endpoint for fetching product data
- [x] Add API endpoints for modifying orders
- [x] Add frontend to update orders
- [x] Store admin login in localStorage
- [x] Finalize CAPTCHA functionality w/ cookies [https://rocket.rs/v0.5-rc/guide/requests/#private-cookies]
- [ ] Add proper error handling
- [ ] Cleanup code
- [ ] Store admin password more securely
- [x] Cleanup code
- [x] Add comments
- [/] Add logging (need to log some API components)
- [ ] Format properly
## API:
`GET /api/price/<shortcode>`
`GET /api/stock/<shortcode>`
`POST /api/update shortcode=string field=[price,stock] value=int/float password=string`
`POST /api/new full_name=string short_name=string price_usd=float stock=int password=string`
`POST /api/order name=string user_message=string email=string payment_type=[xmr,eth,btc]`
Start the server with the environment variable `ADMIN_PASSWD` set to your admin password.
- [x] Add logging
- [x] Format properly