From c22ed9cef93e0efef90c1a4a0f85a47adc29ac62 Mon Sep 17 00:00:00 2001 From: simonzhangsz Date: Sun, 8 Oct 2023 18:09:51 +0800 Subject: [PATCH] d --- config/param/upf_param_config.yaml | 2 +- database/upgrade/zupgrade.sql | 5 ++++- features/cm/param.go | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config/param/upf_param_config.yaml b/config/param/upf_param_config.yaml index 88975625..9044dc50 100644 --- a/config/param/upf_param_config.yaml +++ b/config/param/upf_param_config.yaml @@ -746,7 +746,7 @@ upf: display: "Udp Src Port" comment: "Udp Src Port" - name: "UdpListenPort" - type: "string" + type: "int" value: "2152" access: "read-write" filter: '1~65536' diff --git a/database/upgrade/zupgrade.sql b/database/upgrade/zupgrade.sql index 5dbdf316..bb05b2f3 100644 --- a/database/upgrade/zupgrade.sql +++ b/database/upgrade/zupgrade.sql @@ -81,4 +81,7 @@ ALTER TABLE `omc_db`.`param_config` ADD COLUMN IF NOT EXISTS `method` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '*' COMMENT 'method allow: \"get\", \"get,post,put\", \"*\"' AFTER `top_display`; ALTER TABLE `omc_db`.`trace_data` -MODIFY COLUMN `timestamp` bigint NULL DEFAULT NULL AFTER `msg_direct`; \ No newline at end of file +MODIFY COLUMN `timestamp` bigint NULL DEFAULT NULL AFTER `msg_direct`; + +ALTER TABLE `omc_db`.`param_config` +MODIFY COLUMN `method` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'method allow: \"get\", \"get,post,put\", \"delete\"' AFTER `top_display`; \ No newline at end of file diff --git a/features/cm/param.go b/features/cm/param.go index 21a2cdbc..d273661b 100644 --- a/features/cm/param.go +++ b/features/cm/param.go @@ -142,7 +142,7 @@ func PostParamConfigToNF(w http.ResponseWriter, r *http.Request) { return } - services.ResponseWithJson(w, response.StatusCode(), response) + services.ResponseWithJson(w, http.StatusNoContent, response) } func PutParamConfigToNF(w http.ResponseWriter, r *http.Request) { @@ -194,7 +194,7 @@ func PutParamConfigToNF(w http.ResponseWriter, r *http.Request) { return } - services.ResponseWithJson(w, response.StatusCode(), response) + services.ResponseWithJson(w, http.StatusNoContent, response) } func DeleteParamConfigToNF(w http.ResponseWriter, r *http.Request) { @@ -238,5 +238,5 @@ func DeleteParamConfigToNF(w http.ResponseWriter, r *http.Request) { return } - services.ResponseWithJson(w, response.StatusCode(), response) + services.ResponseWithJson(w, http.StatusNoContent, response) }