diff --git a/universal-registrar/restroom.mjs b/universal-registrar/restroom.mjs index 47c09bf..61444fb 100644 --- a/universal-registrar/restroom.mjs +++ b/universal-registrar/restroom.mjs @@ -65,7 +65,7 @@ const formatInput = (input) => { return { data: input } } -app.post('/create', async (req, res) => { +app.post('/1.0/create', async (req, res) => { var invalid, error = checkVariousInput(req.body); if (invalid) { res.status(400).send({ @@ -124,7 +124,7 @@ const isOperationValid = (input) => { return (!op) || ((op.length == 1) && (op[0] == "setDidDocument")); } -app.post('/update', async (req, res) => { +app.post('/1.0/update', async (req, res) => { var invalid, error = checkVariousInput(req.body); if (invalid) { res.status(400).send({ @@ -182,7 +182,7 @@ app.post('/update', async (req, res) => { else res.status(status).send(rr); }) -app.post('/deactivate', async (req, res) => { +app.post('/1.0/deactivate', async (req, res) => { var invalid, error = checkVariousInput(req.body); if (invalid) { res.status(400).send({ diff --git a/universal-registrar/test/post.sh b/universal-registrar/test/post.sh index 265d8af..ad445df 100755 --- a/universal-registrar/test/post.sh +++ b/universal-registrar/test/post.sh @@ -4,7 +4,7 @@ key_path="universal-registrar/test/keyring.json" call_api() { curl -X 'POST' -o output.json \ - "http://localhost:3000/${1}" \ + "http://localhost:3000/1.0/${1}" \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ @@ -18,7 +18,7 @@ call_api() { zenroom -z -a output.json -k keyring.json sign.zen > res.json curl -X 'POST' \ - "http://localhost:3000/${1}" \ + "http://localhost:3000/1.0/${1}" \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{