mirror of
https://github.com/YMFE/yapi.git
synced 2025-03-07 14:16:52 +08:00
fix: 修改状态导致 method 被修改为get bug 和 opti mock-extra regex 不区分大小写
This commit is contained in:
parent
3b0d91e3cd
commit
c25cd4c890
@ -25,6 +25,7 @@ function mock(mockJSON, context) {
|
||||
c[i] = p[i];
|
||||
if (filters.length > 1) {
|
||||
for (var f = 1, l = filters.length, index; f < l; f++) {
|
||||
filters[f] = filters[f].toLowerCase();
|
||||
if (filters[f] in filtersMap) {
|
||||
if ((index = newFilters.indexOf(filters[f])) !== -1) {
|
||||
newFilters.splice(index, 1);
|
||||
|
@ -360,8 +360,10 @@ class interfaceController extends baseController {
|
||||
catid: 'number'
|
||||
});
|
||||
|
||||
params.method = params.method || 'GET';
|
||||
params.method = params.method.toUpperCase();
|
||||
if (!_.isUndefined(params.method)) {
|
||||
params.method = params.method || 'GET';
|
||||
params.method = params.method.toUpperCase();
|
||||
}
|
||||
|
||||
let id = ctx.request.body.id;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user