fix createUser call

This commit is contained in:
Ulf Gebhardt 2021-11-24 03:56:42 +01:00
parent 04d3804326
commit 30079e2039
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
2 changed files with 4 additions and 18 deletions

View File

@ -42,12 +42,11 @@ export const updateUserInfos = gql`
}
`
export const registerUser = gql`
export const createUser = gql`
mutation(
$firstName: String!
$lastName: String!
$email: String!
$password: String!
$language: String!
$publisherId: Int
) {
@ -55,7 +54,6 @@ export const registerUser = gql`
email: $email
firstName: $firstName
lastName: $lastName
password: $password
language: $language
publisherId: $publisherId
)

View File

@ -85,10 +85,6 @@
<input-email v-model="form.email"></input-email>
<hr />
<input-password-confirmation
v-model="form.password"
:register="register"
></input-password-confirmation>
<b-row>
<b-col cols="12">
@ -158,14 +154,13 @@
</template>
<script>
import InputEmail from '../../components/Inputs/InputEmail.vue'
import InputPasswordConfirmation from '../../components/Inputs/InputPasswordConfirmation.vue'
import LanguageSwitchSelect from '../../components/LanguageSwitchSelect.vue'
import { registerUser } from '../../graphql/mutations'
import { createUser } from '../../graphql/mutations'
import { localeChanged } from 'vee-validate'
import { getCommunityInfoMixin } from '../../mixins/getCommunityInfo'
export default {
components: { InputPasswordConfirmation, InputEmail, LanguageSwitchSelect },
components: { InputEmail, LanguageSwitchSelect },
name: 'register',
mixins: [getCommunityInfoMixin],
data() {
@ -175,10 +170,6 @@ export default {
lastname: '',
email: '',
agree: false,
password: {
password: '',
passwordRepeat: '',
},
},
language: '',
submitted: false,
@ -200,12 +191,11 @@ export default {
async onSubmit() {
this.$apollo
.mutate({
mutation: registerUser,
mutation: createUser,
variables: {
email: this.form.email,
firstName: this.form.firstname,
lastName: this.form.lastname,
password: this.form.password.password,
language: this.language,
publisherId: this.$store.state.publisherId,
},
@ -224,8 +214,6 @@ export default {
this.form.email = ''
this.form.firstname = ''
this.form.lastname = ''
this.form.password.password = ''
this.form.password.passwordRepeat = ''
},
},
computed: {