@nka212bg/backend-utils 0.1.36 → 0.1.37

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.
Files changed (2) hide show
  1. package/misc.js +2 -1
  2. package/package.json +1 -1
package/misc.js CHANGED
@@ -152,8 +152,9 @@ exports.fileServe = ({ filePath, res, download, img } = {}) => {
152
152
  };
153
153
 
154
154
  exports.incomingForm = (req) => {
155
+ if (!req.is("multipart/form-data")) return ["", req.body, ""];
156
+
155
157
  return new Promise((resolve) => {
156
- if (!req.is("multipart/form-data")) return resolve(["", req.body, ""]);
157
158
  new IncomingForm().parse(req, (err, fields, files) => resolve([err, fields, files]));
158
159
  });
159
160
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nka212bg/backend-utils",
3
3
  "author": "nka212bg",
4
- "version": "0.1.36",
4
+ "version": "0.1.37",
5
5
  "main": "index.js",
6
6
  "dependencies": {
7
7
  "@maxmind/geoip2-node": "^5.0.0",