You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.
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?
The text was updated successfully, but these errors were encountered: