Client - add language in user registration payload

This commit is contained in:
Sam 2022-07-03 13:35:57 +02:00
parent 5549eff08b
commit 0e10abb276
2 changed files with 5 additions and 0 deletions

View File

@ -191,6 +191,9 @@
const appConfig: ComputedRef<TAppConfig> = computed(
() => store.getters[ROOT_STORE.GETTERS.APP_CONFIG]
)
const language: ComputedRef<string> = computed(
() => store.getters[ROOT_STORE.GETTERS.LANGUAGE]
)
const registration_disabled: ComputedRef<boolean> = 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,

View File

@ -93,6 +93,7 @@ export interface ILoginRegisterFormData {
username: string
email: string
password: string
language?: string
}
export interface ILoginOrRegisterData {