From 0e10abb276a3f46570c00159643c901fd1409282 Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 3 Jul 2022 13:35:57 +0200 Subject: [PATCH] Client - add language in user registration payload --- fittrackee_client/src/components/User/UserAuthForm.vue | 4 ++++ fittrackee_client/src/types/user.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/fittrackee_client/src/components/User/UserAuthForm.vue b/fittrackee_client/src/components/User/UserAuthForm.vue index 4bff5493..10e007af 100644 --- a/fittrackee_client/src/components/User/UserAuthForm.vue +++ b/fittrackee_client/src/components/User/UserAuthForm.vue @@ -191,6 +191,9 @@ const appConfig: ComputedRef = computed( () => store.getters[ROOT_STORE.GETTERS.APP_CONFIG] ) + const language: ComputedRef = computed( + () => store.getters[ROOT_STORE.GETTERS.LANGUAGE] + ) const registration_disabled: ComputedRef = computed( () => props.action === 'register' && !appConfig.value.is_registration_enabled @@ -245,6 +248,7 @@ } ) default: + formData['language'] = language.value store.dispatch(AUTH_USER_STORE.ACTIONS.LOGIN_OR_REGISTER, { actionType, formData, diff --git a/fittrackee_client/src/types/user.ts b/fittrackee_client/src/types/user.ts index 523d9ee8..108929df 100644 --- a/fittrackee_client/src/types/user.ts +++ b/fittrackee_client/src/types/user.ts @@ -93,6 +93,7 @@ export interface ILoginRegisterFormData { username: string email: string password: string + language?: string } export interface ILoginOrRegisterData {