whistle.mock-plugins 1.1.3-beta.1 → 1.1.3-beta.3
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.
|
@@ -383,7 +383,9 @@ module.exports = function(req, res) {
|
|
|
383
383
|
|
|
384
384
|
// 处理 PATCH 请求 - 部分更新接口(如启用/禁用状态)
|
|
385
385
|
if (req.method === 'PATCH') {
|
|
386
|
-
|
|
386
|
+
// 从URL路径参数或查询参数中获取ID
|
|
387
|
+
const id = req.params?.id || req.query?.id;
|
|
388
|
+
const { active } = req.query;
|
|
387
389
|
const patchData = req.body;
|
|
388
390
|
|
|
389
391
|
// 读取接口数据
|