Create: Backend branch
This commit is contained in:
parent
f91febf919
commit
76ac0c292c
260 changed files with 10 additions and 12964 deletions
9
config/response.config.js
Normal file
9
config/response.config.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
function sendMessage (res, successCode, data, token=null) {
|
||||
res.status(200).json({ status: 'success', successCode: successCode, token: token, data: data });
|
||||
}
|
||||
|
||||
function sendError (res, statusCode, errorCode, reason, token=null) {
|
||||
res.status(statusCode).json({ status: 'error', errorCode: errorCode, token: token, reason: reason});
|
||||
}
|
||||
|
||||
module.exports = { sendMessage, sendError };
|
||||
Reference in a new issue