Unverified Commit cc40c39a authored by sean1025's avatar sean1025 Committed by GitHub

Revert "fix: use lodash compare json other than lib isDeepMatch"

parent a063f382
......@@ -3,7 +3,7 @@ const advModel = require('./advMockModel.js');
const caseModel = require('./caseModel.js');
const yapi = require('yapi.js');
const mongoose = require('mongoose');
const _ = require("lodash");
const _ = require('underscore');
const path = require('path');
const lib = require(path.resolve(yapi.WEBROOT, 'common/lib.js'));
const Mock = require('mockjs');
......@@ -59,7 +59,7 @@ module.exports = function() {
let matchList = [];
listWithIp.forEach(item => {
let params = item.params;
if (item.case_enable && _.isEqual(reqParams, params)) {
if (item.case_enable && lib.isDeepMatch(reqParams, params)) {
matchList.push(item);
}
});
......@@ -74,7 +74,7 @@ module.exports = function() {
.select('_id params case_enable');
list.forEach(item => {
let params = item.params;
if (item.case_enable && _.isEqual(reqParams, params)) {
if (item.case_enable && lib.isDeepMatch(reqParams, params)) {
matchList.push(item);
}
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment