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

I can mix "description": "" and "description": null in my links #13

Open
lilyball opened this issue Jan 4, 2022 · 0 comments
Open

I can mix "description": "" and "description": null in my links #13

lilyball opened this issue Jan 4, 2022 · 0 comments

Comments

@lilyball
Copy link

lilyball commented Jan 4, 2022

When creating links with the API, omitting the description key entirely or passing { "description": null } produces a link with "description": null. However if I pass an empty string ({ "description": "" }) I get back a link with "description": "". AFAIK this doesn't affect the behavior of the link redirector, but it is annoying from an API perspective as it means I have to check if the description is empty instead of just checking if it's non-null.

Expected behavior:

Passing { "description": "" } should produce a link with { "description": null }. Any links I retrieve with GET api/links should ensure the description is either null or non-empty.

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

1 participant