mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
13 lines
378 B
Plaintext
13 lines
378 B
Plaintext
|
#! /bin/bash
|
||
|
|
||
|
if [ $# -lt 3 ]; then
|
||
|
echo "usage: reassign <name> <ipfs_hash> <node>"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
api="http://index-node.default/"
|
||
|
|
||
|
echo Assigning to "$3"
|
||
|
data=$(printf '{"jsonrpc": "2.0", "method": "subgraph_reassign", "params": {"name":"%s", "ipfs_hash":"%s", "node_id":"%s"}, "id":"1"}' "$1" "$2" "$3")
|
||
|
curl -s -H "content-type: application/json" --data "$data" "$api"
|