ROIT response api for node
Library to standardize api response for services.
Basic Usage
app
app
Response Format
SUCCESS
Content-Type: application/json
{
"status": "SUCCESS",
"message": "User successfully created.",
"data": { ... },
"errors": null
}
ERROR
Content-Type: application/json
{
"status": "ERROR",
"message": "Error in create user.",
"data": null,
"errors": [
{
"code": XXX,
"message": "Error in execute request!"
}
]
}