Fix maintenance service/LocaleSwitch import

This commit is contained in:
mattwr18 2019-12-17 16:15:11 +01:00
parent 360078f023
commit 3abfe13dcc
2 changed files with 9 additions and 4 deletions

View File

@ -33,12 +33,12 @@
</template>
<script>
import gql from 'graphql-tag'
import Dropdown from '~/components/Dropdown'
import find from 'lodash/find'
import orderBy from 'lodash/orderBy'
import locales from '~/locales'
import { mapGetters, mapMutations } from 'vuex'
import { updateUserMutation } from '~/graphql/User.js'
export default {
components: {
@ -87,7 +87,14 @@ export default {
if (!this.currentUser || !this.currentUser.id) return null
try {
await this.$apollo.mutate({
mutation: updateUserMutation(),
mutation: gql`
mutation($id: ID!, $locale: String) {
UpdateUser(id: $id, locale: $locale) {
id
locale
}
}
`,
variables: {
id: this.currentUser.id,
locale: this.$i18n.locale(),

View File

@ -180,7 +180,6 @@ export const updateUserMutation = () => {
$about: String
$allowEmbedIframes: Boolean
$showShoutsPublicly: Boolean
$locale: String
$termsAndConditionsAgreedVersion: String
$avatarUpload: Upload
) {
@ -192,7 +191,6 @@ export const updateUserMutation = () => {
about: $about
allowEmbedIframes: $allowEmbedIframes
showShoutsPublicly: $showShoutsPublicly
locale: $locale
termsAndConditionsAgreedVersion: $termsAndConditionsAgreedVersion
avatarUpload: $avatarUpload
) {