Merge branch 'Set_and_save_language_in_user_settings' of https://github.com/Human-Connection/Human-Connection into Set_and_save_language_in_user_settings

This commit is contained in:
ogerly 2019-10-18 12:27:58 +02:00
commit 9aa904e3d3
8 changed files with 13 additions and 13 deletions

View File

@ -109,7 +109,7 @@ module.exports = {
type: 'boolean',
default: false,
},
language: {
locale: {
type: 'string',
allow: [null],
},

View File

@ -381,7 +381,7 @@ describe('SignupVerification', () => {
$nonce: String!
$about: String
$termsAndConditionsAgreedVersion: String!
$language: String
$locale: String
) {
SignupVerification(
name: $name
@ -390,7 +390,7 @@ describe('SignupVerification', () => {
nonce: $nonce
about: $about
termsAndConditionsAgreedVersion: $termsAndConditionsAgreedVersion
language: $language
locale: $language
) {
id
termsAndConditionsAgreedVersion
@ -407,7 +407,7 @@ describe('SignupVerification', () => {
password: '123',
email: 'john@example.org',
termsAndConditionsAgreedVersion: '0.1.0',
language: 'en',
locale: 'en',
}
})

View File

@ -19,7 +19,7 @@ type Mutation {
locationName: String
about: String
termsAndConditionsAgreedVersion: String!
language: String
locale: String
): User
AddEmailAddress(email: String!): EmailAddress
VerifyEmailAddress(

View File

@ -29,7 +29,7 @@ type User {
allowEmbedIframes: Boolean
language: String
locale: String
friends: [User]! @relation(name: "FRIENDS", direction: "BOTH")
friendsCount: Int! @cypher(statement: "MATCH (this)<-[: FRIENDS]->(r: User) RETURN COUNT(DISTINCT r)")
@ -171,7 +171,7 @@ type Mutation {
termsAndConditionsAgreedVersion: String
termsAndConditionsAgreedAt: String
allowEmbedIframes: Boolean
language: String
locale: String
): User
DeleteUser(id: ID!, resource: [Deletable]): User

View File

@ -17,7 +17,7 @@ export default function create() {
termsAndConditionsAgreedVersion: '0.0.1',
termsAndConditionsAgreedAt: '2019-08-01T10:47:19.212Z',
allowEmbedIframes: false,
language: 'en',
locale: 'en',
}
defaults.slug = slugify(defaults.name, { lower: true })
args = {

View File

@ -82,7 +82,7 @@ describe('CreateUserAccount', () => {
nonce: '666777',
password: 'hellopassword',
termsAndConditionsAgreedVersion: '0.0.2',
language: 'en',
locale: 'en',
},
})
expect(mocks.$apollo.mutate).toHaveBeenCalledWith(expected)

View File

@ -156,7 +156,7 @@ export default {
const { name, password, about } = this.formData
const { email, nonce } = this
const termsAndConditionsAgreedVersion = VERSION
const language = this.$i18n.locale()
const locale = this.$i18n.locale()
try {
await this.$apollo.mutate({
mutation: SignupVerificationMutation,
@ -167,7 +167,7 @@ export default {
email,
nonce,
termsAndConditionsAgreedVersion,
language,
locale,
},
})
this.response = 'success'

View File

@ -7,7 +7,7 @@ export const SignupVerificationMutation = gql`
$password: String!
$about: String
$termsAndConditionsAgreedVersion: String!
$language: String
$locale: String
) {
SignupVerification(
nonce: $nonce
@ -16,7 +16,7 @@ export const SignupVerificationMutation = gql`
password: $password
about: $about
termsAndConditionsAgreedVersion: $termsAndConditionsAgreedVersion
language: $language
locale: $locale
) {
id
name