feat(规则): 支持名称代号,便于区分和管理
创建与更新规则时必填全局唯一 name,已有规则迁移回填为 rule-{id}。
This commit is contained in:
@@ -341,6 +341,7 @@ curl -X POST 'http://localhost:8080/api/v1/rules' \
|
||||
-H 'Authorization: Bearer admin-sk-change-me' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"name": "trade-open-alert",
|
||||
"source_name": "trading-system",
|
||||
"event": "trade.open",
|
||||
"template_name": "trade_open",
|
||||
@@ -374,6 +375,7 @@ curl -X PUT 'http://localhost:8080/api/v1/rules/1' \
|
||||
-H 'Authorization: Bearer admin-sk-change-me' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"name": "trade-open-alert",
|
||||
"source_name": "trading-system",
|
||||
"event": "trade.open",
|
||||
"template_name": "trade_open",
|
||||
|
||||
Reference in New Issue
Block a user