Skip to content

Commit 67d2875

Browse files
committed
fix: update record rule datasource ids api
1 parent 238895a commit 67d2875

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

center/router/router_recording_rule.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ func (rt *Router) recordingRulePutFields(c *gin.Context) {
149149
f.Fields["datasource_queries"] = string(bytes)
150150
}
151151

152+
if datasourceIds, ok := f.Fields["datasource_ids"]; ok {
153+
bytes, err := json.Marshal(datasourceIds)
154+
ginx.Dangerous(err)
155+
f.Fields["datasource_ids"] = string(bytes)
156+
}
157+
152158
for i := 0; i < len(f.Ids); i++ {
153159
ar, err := models.RecordingRuleGetById(rt.Ctx, f.Ids[i])
154160
ginx.Dangerous(err)

0 commit comments

Comments
 (0)