This commit is contained in:
robin
2022-07-07 22:16:39 +08:00
parent 264ab8d979
commit a9a4bd0981
86 changed files with 1198 additions and 310 deletions
+2 -2
View File
@@ -1,14 +1,14 @@
module.exports = {
success: (body, msg, status) => {
return {
res : body || null,
data : body || null,
status: status || 200,
message : msg || "success"
}
},
error : (body, msg, status) => {
return {
res : body || null,
data : body || null,
status: status || 400,
message : msg || "error"
}
+1
View File
@@ -6,4 +6,5 @@ const body = require("./body")
module.exports = async (app) => {
app.res = body
app.alias["$res"] = app.res
}