diff --git a/client/coral-admin/src/graphql/index.js b/client/coral-admin/src/graphql/index.js index 4f0831efb..2ab79e75d 100644 --- a/client/coral-admin/src/graphql/index.js +++ b/client/coral-admin/src/graphql/index.js @@ -28,7 +28,7 @@ export default { } } }), - RejectUsername: ({variables: {input: {id: userId}}}) => ({ + RejectUsername: ({variables: {id: userId}}) => ({ updateQueries: { TalkAdmin_Community: (prev) => { const updated = update(prev, { diff --git a/client/coral-admin/src/routes/Community/components/FlaggedUser.js b/client/coral-admin/src/routes/Community/components/FlaggedUser.js index 7a298fe4f..b4f1801e7 100644 --- a/client/coral-admin/src/routes/Community/components/FlaggedUser.js +++ b/client/coral-admin/src/routes/Community/components/FlaggedUser.js @@ -59,7 +59,7 @@ class User extends React.Component { {me.id !== user.id && Suspend User diff --git a/client/coral-admin/src/routes/Community/components/RejectUsernameDialog.js b/client/coral-admin/src/routes/Community/components/RejectUsernameDialog.js index 18e9394a5..e5dd1ac4f 100644 --- a/client/coral-admin/src/routes/Community/components/RejectUsernameDialog.js +++ b/client/coral-admin/src/routes/Community/components/RejectUsernameDialog.js @@ -45,7 +45,7 @@ class RejectUsernameDialog extends Component { const next = () => this.setState({stage: stage + 1}); const suspend = async () => { try { - await rejectUsername({id: user.id, message: this.state.email}); + await rejectUsername(user.id); this.props.handleClose(); } catch (err) { diff --git a/client/coral-framework/graphql/fragments.js b/client/coral-framework/graphql/fragments.js index 55b35a879..2440f458a 100644 --- a/client/coral-framework/graphql/fragments.js +++ b/client/coral-framework/graphql/fragments.js @@ -7,7 +7,7 @@ export default { 'SetUserSuspensionStatusResponse', 'SetCommentStatusResponse', 'SuspendUserResponse', - 'RejectUsernameResponse', + 'SetUsernameStatusResponse', 'CreateCommentResponse', 'CreateFlagResponse', 'EditCommentResponse', diff --git a/client/coral-framework/graphql/mutations.js b/client/coral-framework/graphql/mutations.js index 9987656aa..8c8138ced 100644 --- a/client/coral-framework/graphql/mutations.js +++ b/client/coral-framework/graphql/mutations.js @@ -179,17 +179,17 @@ export const withSuspendUser = withMutation( export const withRejectUsername = withMutation( gql` - mutation RejectUsername($input: RejectUsernameInput!) { - rejectUsername(input: $input) { - ...RejectUsernameResponse + mutation RejectUsername($id: ID!) { + rejectUsername(id: $id) { + ...SetUsernameStatusResponse } } `, { props: ({mutate}) => ({ - rejectUsername: (input) => { + rejectUsername: (id) => { return mutate({ variables: { - input, + id, }, }); }