From 8d7abe9ba00d29ed3a08088dfee4e2e40996b393 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 18 Aug 2020 17:21:58 +0200 Subject: [PATCH 1/2] Fix account suspension Signed-off-by: Thomas Citharel --- js/src/graphql/user.ts | 8 ++++++ js/src/views/Admin/AdminUserProfile.vue | 4 +-- lib/graphql/resolvers/user.ex | 38 ++++++++++++------------- 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/js/src/graphql/user.ts b/js/src/graphql/user.ts index f5fdd350d..88a06d693 100644 --- a/js/src/graphql/user.ts +++ b/js/src/graphql/user.ts @@ -80,6 +80,14 @@ export const DELETE_ACCOUNT = gql` } `; +export const SUSPEND_USER = gql` + mutation SuspendUser($userId: ID) { + deleteAccount(userId: $userId) { + id + } + } +`; + export const CURRENT_USER_CLIENT = gql` query { currentUser @client { diff --git a/js/src/views/Admin/AdminUserProfile.vue b/js/src/views/Admin/AdminUserProfile.vue index 048e7f090..179af473d 100644 --- a/js/src/views/Admin/AdminUserProfile.vue +++ b/js/src/views/Admin/AdminUserProfile.vue @@ -59,7 +59,7 @@