fast dirty fix to limit pdd_get_record_id() to return only 1 result
This commit is contained in:
parent
206be3c161
commit
a7f4aa260b
@ -102,5 +102,5 @@ pdd_get_record_id() {
|
|||||||
curUri="https://pddimp.yandex.ru/api2/admin/dns/list?domain=${curDomain}"
|
curUri="https://pddimp.yandex.ru/api2/admin/dns/list?domain=${curDomain}"
|
||||||
curResult="$(_get "${curUri}" | _normalizeJson)"
|
curResult="$(_get "${curUri}" | _normalizeJson)"
|
||||||
_debug "Result: $curResult"
|
_debug "Result: $curResult"
|
||||||
echo "$curResult" | _egrep_o "{[^{]*\"content\":[^{]*\"subdomain\":\"${curSubdomain}\"" | sed -n -e 's#.* "record_id": \(.*\),[^,]*#\1#p'
|
echo "$curResult" | _egrep_o "{[^{]*\"content\":[^{]*\"subdomain\":\"${curSubdomain}\"" | sed -n -e 's#.* "record_id": \(.*\),[^,]*#\1#p' | _head_n 1
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user