Skip to content

Commit

Permalink
fix(uniregistrar): 🐛 add 1.0 to api path
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-cristino committed Dec 12, 2023
1 parent 51900e3 commit 745bc2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions universal-registrar/restroom.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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({
Expand Down
4 changes: 2 additions & 2 deletions universal-registrar/test/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '{
Expand All @@ -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 '{
Expand Down

0 comments on commit 745bc2b

Please sign in to comment.