diff --git a/client/package-lock.json b/client/package-lock.json index afe53988..9cf5a439 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -3292,11 +3292,6 @@ "tslib": "^1.9.3" } }, - "apollo-link-rest": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/apollo-link-rest/-/apollo-link-rest-0.7.3.tgz", - "integrity": "sha512-Cu60ZO/7de9preDsH3N3zHL40mrMfwgGbxPDdDEqRbes1Ms+DSRqBMv5yB641dSjSeZHKQW1ikQwc8GA8dBJKA==" - }, "apollo-utilities": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.3.3.tgz", @@ -9756,31 +9751,6 @@ "iterall": "^1.2.1" } }, - "graphql-anywhere": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graphql-anywhere/-/graphql-anywhere-4.2.6.tgz", - "integrity": "sha512-re4fqaii3l0fCsC3qFKQrmwffephI9rinrwXAy+4EnWip2YkGlV8wC4en42eW8KI2nlWBh9lkJPfR/5TZf/l1w==", - "requires": { - "apollo-utilities": "^1.3.3", - "ts-invariant": "^0.3.2", - "tslib": "^1.10.0" - }, - "dependencies": { - "ts-invariant": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.3.3.tgz", - "integrity": "sha512-UReOKsrJFGC9tUblgSRWo+BsVNbEd77Cl6WiV/XpMlkifXwNIJbknViCucHvVZkXSC/mcWeRnIGdY7uprcwvdQ==", - "requires": { - "tslib": "^1.9.3" - } - }, - "tslib": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", - "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==" - } - } - }, "graphql-tag": { "version": "2.10.1", "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.10.1.tgz", diff --git a/client/package.json b/client/package.json index b9204380..ee872d1e 100644 --- a/client/package.json +++ b/client/package.json @@ -27,7 +27,6 @@ "apollo-link": "^1.2.13", "apollo-link-error": "^1.1.12", "apollo-link-http": "^1.5.16", - "apollo-link-rest": "^0.7.3", "appolo": "^6.0.19", "autoprefixer": "^7.1.2", "axios": "^0.18.0", @@ -53,7 +52,6 @@ "file-loader": "^1.1.4", "friendly-errors-webpack-plugin": "^1.6.1", "graphql": "^0.13.2", - "graphql-anywhere": "^4.2.6", "graphql-tag": "^2.10.1", "html-webpack-plugin": "^2.30.1", "lodash": "^4.17.10", diff --git a/client/src/graphql/client.js b/client/src/graphql/client.js index e1d83905..17128bd9 100644 --- a/client/src/graphql/client.js +++ b/client/src/graphql/client.js @@ -3,7 +3,6 @@ import {createHttpLink} from 'apollo-link-http' import {onError} from 'apollo-link-error'; import {ApolloClient} from 'apollo-client' import {ApolloLink, Observable} from 'apollo-link' -import {RestLink} from 'apollo-link-rest'; import fetch from 'unfetch' import {typeDefs} from '@/graphql/typedefs'; import {resolvers} from '@/graphql/resolvers'; @@ -19,21 +18,6 @@ export default function (uri, networkErrorCallback) { } }); - const restLink = new RestLink( - { - uri: 'https://stage.hep-verlag.ch', - responseTransformer: async (response, typename) => response.text().then(text => { - if (typename === 'EmailAvailable') { - return { - __typename: typename, - isAvailable: text === 'true' - }; - } else { - return text; - } - }) - } - ); // todo: use env variable const consoleLink = new ApolloLink((operation, forward) => { // console.log(`starting request for ${operation.operationName}`); @@ -80,7 +64,7 @@ export default function (uri, networkErrorCallback) { } }); - const composedLink = ApolloLink.from([createOmitTypenameLink, consoleLink, errorLink, restLink, httpLink]); + const composedLink = ApolloLink.from([createOmitTypenameLink, consoleLink, errorLink, httpLink]); const cache = new InMemoryCache({ dataIdFromObject: obj => { diff --git a/client/src/graphql/gql/rest/isEmailAvailableQuery.gql b/client/src/graphql/gql/rest/isEmailAvailableQuery.gql deleted file mode 100644 index e46fba9b..00000000 --- a/client/src/graphql/gql/rest/isEmailAvailableQuery.gql +++ /dev/null @@ -1,6 +0,0 @@ - -query IsEmailAvailable($input: String!) { - isEmailAvailable(input: $input) @rest(type: "EmailAvailable", path: "/rest/deutsch/V1/customers/isEmailAvailable", method: "POST") { - isAvailable - } -} diff --git a/client/src/graphql/gql/rest/registerMutation.gql b/client/src/graphql/gql/rest/registerMutation.gql deleted file mode 100644 index 02f5f34e..00000000 --- a/client/src/graphql/gql/rest/registerMutation.gql +++ /dev/null @@ -1,6 +0,0 @@ - -query IsEmailAvailable($input: String!) { - isEmailAvailable(input: $input) @rest(type: "isEmailAvailable", path: "/rest/deutsch/V1/customers/isEmailAvailable", methods: "POST") { - isAvailable - } -} diff --git a/client/src/hep-client/index.js b/client/src/hep-client/index.js index 5693988d..956e8d3e 100644 --- a/client/src/hep-client/index.js +++ b/client/src/hep-client/index.js @@ -9,3 +9,10 @@ export function register(registrationData) { export function login(username, password) { return axios.post(`${hepBaseUrl}/rest/deutsch/V1/integration/customer/token`, {username, password}); } + +export function emailExists(email) { + return axios.post(`${hepBaseUrl}/rest/deutsch/V1/customers/isEmailAvailable`, { + customerEmail: email, + websiteId: 1 + }); +} diff --git a/client/src/pages/forgot-password.vue b/client/src/pages/forgot-password.vue index bfb86af2..5436afd1 100644 --- a/client/src/pages/forgot-password.vue +++ b/client/src/pages/forgot-password.vue @@ -4,7 +4,7 @@
Ihr Benutzerkonto wird durch den Hep Verlag verwaltet und deshalb können Sie das Passwort ausschliesslich auf +
Ihr Benutzerkonto wird durch den Hep Verlag verwaltet und deshalb können Sie das Passwort ausschliesslicht auf www.hep-verlag.ch verwaltet werden.
Melden Sie sich mit der gleichen E-Mail-Adresse und dem gleichen