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

Adding a link with a tag or link via API call fails #145

Closed
bradym opened this issue Aug 9, 2020 · 2 comments · Fixed by #144
Closed

Adding a link with a tag or link via API call fails #145

bradym opened this issue Aug 9, 2020 · 2 comments · Fixed by #144

Comments

@bradym
Copy link

bradym commented Aug 9, 2020

I've been wanting something like linkace for awhile now, thanks for sharing it with us!

I'm trying to add a link with tags via the API, just testing via postman for now, and it's failing with an SQL error.

Here's the call I'm making in curl form:

curl --location --request POST 'http://localhost:8085/api/v1/links' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer superSecret' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "https://example.com",
    "tags": [3]
}'

The error coming back is:

SQLSTATE[42S22]: Column not found: 1054 Unknown column '3' in 'field list' (SQL: 
select `3` 
from `tags` 
where `tags`.`deleted_at` is null 
order by `name` asc limit 1)

I've put the full stacktrace at https://gist.github.com/bradym/e030df5a441637c204c0b847c8375c1b

The same thing happens when trying to add a link with a list, stacktrace for list here: https://gist.github.com/bradym/d6bc67637c4baf347e016f72d7122aee

Please let me know if there's any other info I can provide to help track this down.

@bradym bradym changed the title Adding a link with a tag via API call fails Adding a link with a tag or link via API call fails Aug 9, 2020
@Kovah
Copy link
Owner

Kovah commented Aug 9, 2020

Thanks for the report. I plan to rebuild the handling of tags and lists via API calls for the next version, will probably be fixed then. (see #143)

@Kovah Kovah linked a pull request Aug 12, 2020 that will close this issue
@bradym
Copy link
Author

bradym commented Aug 19, 2020

Just pulled the latest docker image and it's working as expected. Thanks!

@bradym bradym closed this as completed Aug 19, 2020
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

Successfully merging a pull request may close this issue.

2 participants