Backend part for the Be the Hero application.
- Nodejs
- Express
- SQLite
- Knex
-
/sessions
sendPOST
with the your charity ID on the body, if the cheity exists the response will be{ name: CHARITY_NAME }
. -
/ongs
sendPOST
with a body that contains name, email, whatsapp, city, uf. if succsessfull the response will be{ id: ONG_ID }
. -
/ongs
sendGET
, will list all the ongs registered on the database. -
/incidents
sendPOST
with a body containing title, description and value, also, you'll need on the headers{ authorization: CHARITY_ID }
. -
/incidents
sendGET
to get the all incidents, theres pagianation you can send on the query?page=NUMBER
there a limit of 5 incidents per page. -
/incidents/:id
sendDELETE
with the incidentID
on the route and on the headers{ authorization: CHARITY_ID }
. -
/profile
list all incidents from a charity sending on the headers{ authorization: CHARITY_ID }
.