diff --git a/libs/route-utils/index.js b/libs/route-utils/index.js index f2ff813..13dc203 100644 --- a/libs/route-utils/index.js +++ b/libs/route-utils/index.js @@ -1,5 +1,5 @@ const _ = require('lodash') - +const resMessage = require('./res-message') /** * check Object * @param {string} key key name @@ -44,7 +44,7 @@ const chkObject = function (key = '', type = '', empty = false) { return true } -const resObject = () => { +const resObject = (key = null, message = null, msgCode = null) => { } diff --git a/libs/route-utils/res-message/index.js b/libs/route-utils/res-message/index.js index bdd5ca6..427a6f8 100644 --- a/libs/route-utils/res-message/index.js +++ b/libs/route-utils/res-message/index.js @@ -3,6 +3,7 @@ module.exports = { status: 200, obj: { status: 200, + msgCode: 10000, message: 'success' } }, @@ -10,6 +11,7 @@ module.exports = { status: 400, obj: { status: 400, + msgCode: 11000, message: 'input data format error' } }, @@ -33,6 +35,7 @@ module.exports = { status: 500, obj: { status: 500, + msgCode: 12000, message: 'server internal error' } }