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', type: 'boolean',
default: false, default: false,
}, },
language: { locale: {
type: 'string', type: 'string',
allow: [null], allow: [null],
}, },

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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