Open jruffer opened 4 years ago
API_URL="http://localhost:8081"
curl --location --request POST "$API_URL/users" \ --header 'PayID-API-Version: 2020-06-18' \ --header 'Authorization: foo' \ --header 'Content-Type: application/json' \ --data-raw '{ "payId": "foo$127.0.0.1", "addresses": [ { "paymentNetwork": "XRPL", "environment": "TESTNET", "details": { "address": "rDk7FQvkQxQQNGTtfM2Fr66s7Nm3k87vdS", "tag": "123" } } ] }' echo echo
curl --location --request GET "$API_URL/users/foo\$127.0.0.1" \ --header 'PayID-API-Version: 2020-06-18' \ --header 'Authorization: foo' \ --header 'Content-Type: application/json' echo echo
curl --location --request PUT "$API_URL/users/foo\$127.0.0.1" \ --header 'PayID-API-Version: 2020-06-18' \ --header 'Authorization: foo' \ --header 'Content-Type: application/json' \ --data-raw '{ "payId": "foo$127.0.0.1", "addresses": [ ] }' echo echo
If applicable, add screenshots to help explain your problem.
Are you willing to submit a pull request to fix this bug?
@intelliot has any work begun on this ? We just hit it as well.
Expected Behavior
Actual Behavior
Context
Potential Solution
Steps to Reproduce
!/bin/bash
API_URL="http://localhost:8081"
Create foo$127.0.0.1 user with 1 address
curl --location --request POST "$API_URL/users" \ --header 'PayID-API-Version: 2020-06-18' \ --header 'Authorization: foo' \ --header 'Content-Type: application/json' \ --data-raw '{ "payId": "foo$127.0.0.1", "addresses": [ { "paymentNetwork": "XRPL", "environment": "TESTNET", "details": { "address": "rDk7FQvkQxQQNGTtfM2Fr66s7Nm3k87vdS", "tag": "123" } } ] }' echo echo
Fetch the user to see what it looks like
curl --location --request GET "$API_URL/users/foo\$127.0.0.1" \ --header 'PayID-API-Version: 2020-06-18' \ --header 'Authorization: foo' \ --header 'Content-Type: application/json' echo echo
Updating the user and removing addresses in the process
curl --location --request PUT "$API_URL/users/foo\$127.0.0.1" \ --header 'PayID-API-Version: 2020-06-18' \ --header 'Authorization: foo' \ --header 'Content-Type: application/json' \ --data-raw '{ "payId": "foo$127.0.0.1", "addresses": [ ] }' echo echo
Fetch the user to see what it looks like
curl --location --request GET "$API_URL/users/foo\$127.0.0.1" \ --header 'PayID-API-Version: 2020-06-18' \ --header 'Authorization: foo' \ --header 'Content-Type: application/json' echo echo
returns error:
{"statusCode":404,"error":"Not Found","message":"No information could be found for the PayID foo$127.0.0.1."}
User not found, so I assume I can create it again
curl --location --request POST "$API_URL/users" \ --header 'PayID-API-Version: 2020-06-18' \ --header 'Authorization: foo' \ --header 'Content-Type: application/json' \ --data-raw '{ "payId": "foo$127.0.0.1", "addresses": [ { "paymentNetwork": "XRPL", "environment": "TESTNET", "details": { "address": "rDk7FQvkQxQQNGTtfM2Fr66s7Nm3k87vdS", "tag": "123" } } ] }' echo echo
returns error:
{"statusCode":409,"error":"Conflict","message":"There already exists a user with the provided PayID"}
Environment
Screenshots
If applicable, add screenshots to help explain your problem.
Bonus
Are you willing to submit a pull request to fix this bug?