This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Changes for client-setting, authentication-setting services hook refactor #8990
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hanzlamateen
suggested changes
Oct 9, 2023
packages/server-core/src/setting/authentication-setting/authentication-setting.hooks.ts
Outdated
Show resolved
Hide resolved
packages/server-core/src/setting/authentication-setting/authentication-setting.hooks.ts
Outdated
Show resolved
Hide resolved
packages/server-core/src/setting/authentication-setting/authentication-setting.hooks.ts
Outdated
Show resolved
Hide resolved
packages/server-core/src/setting/authentication-setting/authentication-setting.hooks.ts
Outdated
Show resolved
Hide resolved
packages/server-core/src/setting/authentication-setting/authentication-setting.hooks.ts
Outdated
Show resolved
Hide resolved
barankyle
approved these changes
Oct 10, 2023
hanzlamateen
approved these changes
Oct 15, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
🤖 Generated by Copilot at a225101
Refactored the service classes and hooks for authentication and client settings in
server-core
package. UsedKnexService
instead ofKnexAdapter
for database access, moved custom logic to hooks, and simplified imports and arguments. These changes improve the code quality, modularity, and maintainability of the settings modules.References
#8871
Explanation
🤖 Generated by Copilot at a225101
AuthenticationSettingService
andClientSettingService
classes to extend theKnexService
class instead of theKnexAdapter
class, which is deprecated (link, link)find
,get
, andpatch
from the service class files and moved them to the hooks files, where they can be applied as middleware functions (link, link, link, link, link, link)ensureOAuth
,mapSettingsAdmin
, andrefreshAPIPods
functions to theauthentication-setting.hooks.ts
file, which are custom hooks that perform additional logic before or after the service methods for theAuthenticationSettingService
(link, link, link)updateWebManifest
function to theclient-setting.hooks.ts
file, which is a custom hook that updates the web manifest file in the storage provider with the new client settings data when thepatch
method is called for theClientSettingService
(link, link, link)app.use
calls in theauthentication-setting.ts
andclient-setting.ts
files to pass only theoptions
argument to the service class constructors, since theapp
argument is no longer needed (link, link)🤖 Generated by Copilot at a225101
QA Steps
List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.
Checklist