修正數據集圖像列表
This commit is contained in:
2
test.sh
2
test.sh
@@ -46,7 +46,7 @@ echo "dataset_id: $dataset_id"
|
||||
|
||||
|
||||
# 修改數據集, images 中增加 url (PATCH /api/datasets/:id)
|
||||
response=$(curl -X PATCH -H "Content-Type: application/json" -d '{"images":[{"url":"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"}]}' -b "session_id=$session_id" -s -w "%{http_code}" http://localhost:8080/api/datasets/$dataset_id)
|
||||
response=$(curl -X PATCH -H "Content-Type: application/json" -d '{"images":["https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"]}' -b "session_id=$session_id" -s -w "%{http_code}" http://localhost:8080/api/datasets/$dataset_id)
|
||||
[[ ${response: -3} -eq 200 ]] && { echo "修改數據集成功: ${response%???}"; } || exit_service "修改數據集失敗: ${response%???}"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user