mm_os 1.4.8 → 1.5.0

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.
@@ -508,8 +508,8 @@ Drive.prototype.del_main = async function(db, query) {
508
508
  * @param {Object} body 修改项
509
509
  * @return {Object} 返回删除结果
510
510
  */
511
- Drive.prototype.del = async function(db, query, body) {
512
- return await this.del_main(db, query);
511
+ Drive.prototype.del = async function(db, query, body = {}) {
512
+ return await this.del_main(db, Object.assign({}, query, body));
513
513
  };
514
514
 
515
515
  /**
@@ -56,7 +56,7 @@ module.exports = function(server, config) {
56
56
  // 解析 application/json、application/x-www-form-urlencoded、text/plain
57
57
  // 接收主体
58
58
  server.use(async (ctx, next) => {
59
- if (!ctx.request.body && ctx.request.method == "POST") {
59
+ if (!ctx.request.body) {
60
60
  await func(ctx, next);
61
61
  } else {
62
62
  await next();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_os",
3
- "version": "1.4.8",
3
+ "version": "1.5.0",
4
4
  "description": "这是超级美眉服务端框架,用于快速构建应用程序。",
5
5
  "main": "index.js",
6
6
  "scripts": {