Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registering a right #36

Open
addywaddy opened this issue Jul 18, 2017 · 1 comment
Open

Registering a right #36

addywaddy opened this issue Jul 18, 2017 · 1 comment

Comments

@addywaddy
Copy link

addywaddy commented Jul 18, 2017

Just been working my way through the example here and noticed that when creating a right, leaving out the sourceRightId causes an application error:

POST http://localhost:3000/api/v1/rights

{
    "right": {
        "license": "My license"
    },
    "currentHolder": {
        "publicKey": "Hrzhm61KQut7Rm2nT1k1f7gGpUWijxsGd8udcPqE5sSK",
	"privateKey": "Eiea9RJPRAYqokwVbwr9tw7vt6HWdsZ9TbyFzjaeMdUc"
    },
    "sourceRightId": ""
}

Leaving out any of the other fields results in a 400 with useful information in the body as to why the request was unsuccessful.

@TimDaub
Copy link
Contributor

TimDaub commented Jul 19, 2017

Thanks for pointing that out. pycoalaip expects sourceRightId to be defined (so the empty string is disallowed).

flask_restful doesn't currently handle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants