From d5b2356caf86b252deb022b15f6a7aef977d7312 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 23 Nov 2021 12:08:23 +0100 Subject: [PATCH] setPassword in frontend remove resetPassword --- backend/src/graphql/resolver/UserResolver.ts | 17 ------------ frontend/src/graphql/mutations.js | 6 ++--- frontend/src/views/Pages/ResetPassword.vue | 28 +++----------------- 3 files changed, 7 insertions(+), 44 deletions(-) diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts index 1c4bc2b50..8057dec15 100644 --- a/backend/src/graphql/resolver/UserResolver.ts +++ b/backend/src/graphql/resolver/UserResolver.ts @@ -470,23 +470,6 @@ export class UserResolver { return true } - @Mutation(() => String) - async resetPassword( - @Args() - { sessionId, email, password }: ChangePasswordArgs, - ): Promise { - const payload = { - session_id: sessionId, - email, - password, - } - const result = await apiPost(CONFIG.LOGIN_API_URL + 'resetPassword', payload) - if (!result.success) { - throw new Error(result.data) - } - return 'success' - } - @Query(() => Boolean) async setPassword( @Arg('code') code: string, diff --git a/frontend/src/graphql/mutations.js b/frontend/src/graphql/mutations.js index d1d3d583c..eafffd957 100644 --- a/frontend/src/graphql/mutations.js +++ b/frontend/src/graphql/mutations.js @@ -12,9 +12,9 @@ export const unsubscribeNewsletter = gql` } ` -export const resetPassword = gql` - mutation($sessionId: Float!, $email: String!, $password: String!) { - resetPassword(sessionId: $sessionId, email: $email, password: $password) +export const setPassword = gql` + mutation($code: String!, $password: String!) { + setPassword(code: $code, password: $password) } ` diff --git a/frontend/src/views/Pages/ResetPassword.vue b/frontend/src/views/Pages/ResetPassword.vue index 81b3d7df7..11bf88194 100644 --- a/frontend/src/views/Pages/ResetPassword.vue +++ b/frontend/src/views/Pages/ResetPassword.vue @@ -49,7 +49,7 @@