陈少旭 vor 5 Monaten
Ursprung
Commit
fa4b439307

+ 1 - 1
controllers/admin_api_controllers/admin_api_router_register.go Datei anzeigen

@@ -18,7 +18,7 @@ func AdminAPIControllersRegisterRouters() {
18 18
 	beego.Router("/admin/api/custom/list", &CustomAPIController{}, "get:GetCustomList")
19 19
 	beego.Router("/admin/api/custom/get", &CustomAPIController{}, "get:GetCustom")
20 20
 	beego.Router("/admin/api/custom/check", &CustomAPIController{}, "post:CheckCustom")
21
-	beego.Router("/admin/api/custom/delete", &CustomAPIController{}, "post:CheckCustom")
21
+	beego.Router("/admin/api/custom/delete", &CustomAPIController{}, "post:DeleteCustom")
22 22
 
23 23
 	//beego.Router("/admin/api/checkcustom/get", &CustomAPIController{}, "get:GetWaitCheckCustom")
24 24
 

+ 1 - 1
service/custom_service.go Datei anzeigen

@@ -18,7 +18,7 @@ func SaveCustom(admin *models.KyyChargeCustom) (err error) {
18 18
 }
19 19
 
20 20
 func SaveCustomTwo(admin models.KyyChargeCustomThree) (err error) {
21
-	err = ChargeWriteDB().Model(&models.KyyChargeCustomThree{}).Create(&admin).Error
21
+	err = ChargeWriteDB().Model(&models.KyyChargeCustomThree{}).Save(&admin).Error
22 22
 	return
23 23
 }
24 24
 func GetAllCustoms() (cus []*models.KyyChargeCustom, err error) {