Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Changes for route, login-token services hook refactor #8992

Merged
merged 7 commits into from
Oct 13, 2023
Merged

Conversation

MoizAdnan
Copy link
Member

@MoizAdnan MoizAdnan commented Oct 5, 2023

Summary

🤖 Generated by Copilot at fa04c16

Refactored the RouteService and LoginTokenService classes to use KnexService and custom hooks. Added pagination support for the RouteService to allow clients to fetch routes more efficiently. Simplified and cleaned up some code and imports.

References

#8871

Explanation

🤖 Generated by Copilot at fa04c16

  • Refactored RouteService and LoginTokenService classes to extend KnexService instead of KnexAdapter for more flexibility and simplicity (link, link, link, link, link, link)
  • Added enableClientPagination hook to RouteService and LoginTokenService to allow clients to request pagination options for the find method using query parameters (link, link, link)
  • Moved the logic for generating and setting the token and expiration date for the login token from the LoginTokenService class to a separate generateToken hook function (link, link, link, link)
  • Updated the Login class to use the remove method instead of the _remove method of the LoginTokenService, and to cast the result of the find method as Paginated<LoginTokenType> (link, link, link)
  • Removed unused imports and parameters from various files (link, link, link, link)

🤖 Generated by Copilot at fa04c16

KnexService base
refactors and simplifies
code in the springtime

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

Checklist

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • ensure all checks pass
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewers

@MoizAdnan MoizAdnan marked this pull request as ready for review October 9, 2023 01:51
@barankyle barankyle added this pull request to the merge queue Oct 13, 2023
Merged via the queue into dev with commit c135675 Oct 13, 2023
12 checks passed
@barankyle barankyle deleted the route-hooks branch October 13, 2023 20:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants