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

refactor(core): Move getInstaceBaseUrl to the InstanceService (no-changelog) #7773

Closed
wants to merge 1 commit into from

Conversation

RicardoE105
Copy link
Contributor

@RicardoE105 RicardoE105 commented Nov 21, 2023

Was trying to break a dependency cycle in the UserService and ended up needing to extract the getInstaceBaseUrl and move it into its own service. Feel free to drop it if this is not the right approach. Ideally we would keep extracting everything from the UsermanagmentHelpers.ts file and remove it. This change also allows to inject the UserService to the ExternalHooks without trowing ReferenceError: Cannot inject an undefined dependency. Possibly a circular dependency detected

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Nov 21, 2023
@RicardoE105 RicardoE105 changed the title refactor: Move getInstaceBaseUrl to the InstanceService (no-changelog) refactor(core): Move getInstaceBaseUrl to the InstanceService (no-changelog) Nov 21, 2023
@netroy
Copy link
Member

netroy commented Nov 21, 2023

I was trying to do something similar but for all URLs https://github.com/n8n-io/n8n/pull/6713/files#diff-9daec241c2523091797d233cad6901e58ddd06a5b3a0a50e690e8d7aa134bc33

@RicardoE105
Copy link
Contributor Author

Closing this one and will pick up what you left whenever I have the change!

@RicardoE105 RicardoE105 closed this Dec 4, 2023
netroy added a commit that referenced this pull request Dec 22, 2023
This change kept coming up in #6713, #7773, and #8135. 
So this PR moves the existing code without actually changing anything,
to help get rid of some of the circular dependencies.


## Review / Merge checklist
- [x] PR title and summary are descriptive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants