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

add lang filter option to message endpoints #902

Merged
merged 3 commits into from Jan 23, 2023

Conversation

j0rd1smit
Copy link
Contributor

add lang filter option to message endpoints

Fixes issues #896

As descriped in the issues, I added a lang filter option to:

  • api/v1/messages
  • api/v1/messages/cursor
  • api/v1/users/{user-id}/messages
  • api/v1/users/{user-id}/messages/cursor

I saw that query_messages_ordered_by_created_date() is also used in /api/v1/frontend_users/{auth_method}/{username}/messages and ``/api/v1/frontend_users/{auth_method}/{username}/messages/cursor`. However, I did not add the lang filter to this endpoint since the issues did not specify this endpoint. So, I was unsure if this was desired or not. Let me know if you also want it there, it is an easy fix.

Copy link
Collaborator

@andreaskoepf andreaskoepf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice job. :-)

@andreaskoepf
Copy link
Collaborator

However, I did not add the lang filter to this endpoint since the issues did not specify this endpoint. So, I was unsure if this was desired or not. Let me know if you also want it there, it is an easy fix.

Yes, I think it would be useful to have the same lang query-param for the other places that you identified, too. If you have time to do it, please add it. Otherwise I will merge this PR in 24h.

@j0rd1smit
Copy link
Contributor Author

If you have time to do it, please add it

Done 😀

Copy link
Collaborator

@andreaskoepf andreaskoepf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@andreaskoepf andreaskoepf enabled auto-merge (squash) January 23, 2023 21:46
@andreaskoepf andreaskoepf merged commit 8c632f9 into LAION-AI:main Jan 23, 2023
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 this pull request may close these issues.

None yet

2 participants