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

Fix for get_community function #3

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

ihyoudou
Copy link
Contributor

I'm not sure why, but lemmy doesn't seem to accept name or id in request body for that endpoint (returns HTTP code 400 - {"error":"no_id_given"}. When it is passed as a param, it works.

Example code to test:

from plemmy import LemmyHttp

api = LemmyHttp("https://sh.itjust.works")
api.login("dummy_username", "dummy_password")
community = api.get_community(name="opensource@lemmy.ml")
print(community)
print(community.json())

@tjkessler
Copy link
Collaborator

Nice find! Is this the case just for get_community, or are other GET operations affected?

@tjkessler tjkessler self-assigned this Jun 21, 2023
@tjkessler tjkessler added the bug Something isn't working label Jun 21, 2023
@ihyoudou
Copy link
Contributor Author

As of right now, I'm not aware of other endpoints that have this issue, but I was also not looking that deep into it

@tjkessler
Copy link
Collaborator

Well, with your to get_handler edits, any similar bugs can easily be fixed! Thanks for the contribution, merging now.

@tjkessler tjkessler merged commit 40d12ff into Fedihosting-Foundation:main Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants