refactor(editor): Detangle users store from settings store (no-changelog) (#16510)

This commit is contained in:
Alex Grozav
2025-06-20 13:01:44 +03:00
committed by GitHub
parent f598b3bf00
commit 4f4fa5e4af
6 changed files with 39 additions and 36 deletions

View File

@@ -4,8 +4,8 @@ import type { N8nPromptResponse } from '@n8n/rest-api-client/api/prompts';
import type { ModalKey } from '@/Interface';
import { VALID_EMAIL_REGEX } from '@/constants';
import Modal from '@/components/Modal.vue';
import { useSettingsStore } from '@/stores/settings.store';
import { useRootStore } from '@n8n/stores/useRootStore';
import { useUsersStore } from '@/stores/users.store';
import { createEventBus } from '@n8n/utils/event-bus';
import { useToast } from '@/composables/useToast';
import { useNpsSurveyStore } from '@/stores/npsSurvey.store';
@@ -20,7 +20,7 @@ const modalBus = createEventBus();
const npsSurveyStore = useNpsSurveyStore();
const rootStore = useRootStore();
const settingsStore = useSettingsStore();
const usersStore = useUsersStore();
const toast = useToast();
const telemetry = useTelemetry();
@@ -56,7 +56,7 @@ const closeDialog = () => {
const send = async () => {
if (isEmailValid.value) {
const response = (await settingsStore.submitContactInfo(email.value)) as N8nPromptResponse;
const response = (await usersStore.submitContactInfo(email.value)) as N8nPromptResponse;
if (response.updated) {
telemetry.track('User closed email modal', {