API hosted on heroku: https://bettercity-api.herokuapp.com/
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
POST /login
{
"email": "user@example.com",
"password": "pass"
}
POST /register
{
"email": "user@example.com",
"password": "pass",
"name": "Name"
}
POST /reset-password
{
"email": "user@example.com",
}
GET /me
Authenticated user needed - Bearer token
GET /users
Authenticated user needed - Bearer token
POST /issues/create
Authenticated user needed - Bearer token
{
"title":"Issue Title 1",
"description":"This is a good description for testing",
"zone":"Centru",
"priority":"medium",
"address":"Suceava, Romania",
"type":"Pothole",
"lat":"0",
"lng":"0",
"pictures":["some base64 string", "some base64 string"],
"likes":["uuid-user1", "uuid-user2"]
}
GET /issues/mine
Authenticated user needed - Bearer token
GET /issues
GET /issues/:id
POST /issues/likes
Authenticated user needed - Bearer token
{
"issueId":"some-uuid"
}
GET /statistics