Update
This commit is contained in:
parent
4dfd8cd516
commit
5a64568824
22 changed files with 702 additions and 194 deletions
9
backend/app/config/response.config.js
Normal file
9
backend/app/config/response.config.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
function sendMessage (res, successCode, data) {
|
||||
return res.status(200).json({ status: 'success', successCode: successCode, data: data });
|
||||
}
|
||||
|
||||
function sendError (res, statusCode, errorCode, reason) {
|
||||
return res.status(statusCode).json({ status: 'error', errorCode: errorCode, reason: reason });
|
||||
}
|
||||
|
||||
module.exports = { sendMessage, sendError };
|
||||
Reference in a new issue