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

CHT-Api library should change behavior to adapt to differing cht-core version #133

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

kennsippell
Copy link
Member

@kennsippell kennsippell commented Apr 2, 2024

#114

  • Look up the cht-core version during login and attach version information to the session. This requires all users to be logged out on deployment.
  • This change updates ChtApi with two new versions ChtApi_4_6 which adapts to handles cht-core#8674 or ChtApi_4_7 which handles cht-core#8877
  • ChtApi is now created via factory pattern ChtApi.create()
  • I have elected not to use cht-core#8986 for reasons details here. It is just an awkward place to create variant-aware logic because it is pre-login.
  • I removed the chtSession from the FastifyRequest object and replaced it with a ChtApi object. This was originally required to avoid a circular dependency but is no longer required. I kinda liked it a bit more so left it in the changes.

@kennsippell kennsippell changed the title Use the new /api/v2/users API endpoints on >= cht-core 4.7 CHT-Api library should change behavior to adapt to differing cht-core version Apr 3, 2024
@kennsippell kennsippell marked this pull request as ready for review April 3, 2024 14:17
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.

1 participant