lieko-express 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1854 -0
- package/lieko-express.js +4 -1
- package/package.json +7 -2
package/lieko-express.js
CHANGED
|
@@ -1086,9 +1086,12 @@ class LiekoExpress {
|
|
|
1086
1086
|
};
|
|
1087
1087
|
|
|
1088
1088
|
res.ok = (data, message) => {
|
|
1089
|
+
if (!res.statusCode || res.statusCode === 200) {
|
|
1090
|
+
res.status(200);
|
|
1091
|
+
}
|
|
1089
1092
|
const payload = { success: true, data };
|
|
1090
1093
|
if (message !== undefined) payload.message = message;
|
|
1091
|
-
return res.
|
|
1094
|
+
return res.json(payload);
|
|
1092
1095
|
};
|
|
1093
1096
|
res.success = res.ok;
|
|
1094
1097
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lieko-express",
|
|
3
|
-
"
|
|
3
|
+
"repository": {
|
|
4
|
+
"type": "git",
|
|
5
|
+
"url": "https://github.com/eiwSrvt/lieko-express"
|
|
6
|
+
},
|
|
7
|
+
"homepage": "https://github.com/eiwSrvt/lieko-express",
|
|
8
|
+
"version": "0.0.3",
|
|
4
9
|
"description": "Lieko-express — A Modern, Minimal, REST API Framework for Node.js",
|
|
5
10
|
"main": "lieko-express.js",
|
|
6
11
|
"scripts": {
|
|
@@ -14,4 +19,4 @@
|
|
|
14
19
|
"lieko-express.js",
|
|
15
20
|
"README.md"
|
|
16
21
|
]
|
|
17
|
-
}
|
|
22
|
+
}
|