/be-the-hero

Primary LanguageJavaScript

Be The Hero

This project was developed for studies. It should not be used in production

Installation

Clone repository

git clone https://github.com/votanruchel/be-the-hero/ <folder>

and install dependencies

If use Yarn

yarn

else use npm

npm install

API Usage

Register a new ONG

Method: POST
Send for Route: '/ongs'

  body: {
	"name": "APAD3",
	"email": "contact@contato.com",
	"whatsapp": "54545454544",
	"city": "Rio do Sul",
	"uf": "SC"
}

Register a new Incident Method: POST
Send for Route: '/incident'

  headers:{
    Authorization: <ong_id>
  }
  body: {
	"title": "Test Incident",
	"description": "Description of test incident",
	"value": 440
}

Delete Incident Method: DELETE
Send for Route: '/incident/:incident_id'

  headers:{
    Authorization: <ong_id>
  },
  params: {
	"id": <incident_id>,
}

List ONGS
Method: GET

http://127.0.0.1:3333/ongs

List Incidents
Method: GET

http://127.0.0.1:3333/incidents

If use pagination

http://127.0.0.1:3333/incidents?page=<page_number>

Basic Login
Method: POST

body:{
  "id": "cef3fda8"
}

See all incidents of logged ONG Method: GET
Send for Route: '/profile'

headers:{
  Authorization: <ong_id>
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate. Thanks

Author

Votan Ruchel

Mobile Screen Home

Desktop Version Home (After login)