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.
package/core/com/sql/drive.js
CHANGED
|
@@ -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
|
|
59
|
+
if (!ctx.request.body) {
|
|
60
60
|
await func(ctx, next);
|
|
61
61
|
} else {
|
|
62
62
|
await next();
|