mirror of
https://github.com/wassname/talk.git
synced 2026-07-12 17:04:37 +08:00
Refactor for setUserStatus to setUserBanStatus
This commit is contained in:
@@ -196,20 +196,19 @@ export const withRejectUsername = withMutation(
|
||||
})
|
||||
});
|
||||
|
||||
export const withsetUserBanStatus = withMutation(
|
||||
export const withSetUserBanStatus = withMutation(
|
||||
gql`
|
||||
mutation SetUserBanStatus($id: ID!, $status: Boolean!) {
|
||||
setUserBanStatus(id: $id, status: $status) {
|
||||
mutation SetUserBanStatus($input: SetUserBanStatusInput!) {
|
||||
setUserBanStatus(input: $input) {
|
||||
...SetUserBanStatusResponse
|
||||
}
|
||||
}
|
||||
`, {
|
||||
props: ({mutate}) => ({
|
||||
setUserBanStatus: ({id, status}) => {
|
||||
setUserBanStatus: (input) => {
|
||||
return mutate({
|
||||
variables: {
|
||||
id,
|
||||
status,
|
||||
input,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -228,7 +227,7 @@ export const withPostComment = withMutation(
|
||||
postComment: (input) => {
|
||||
return mutate({
|
||||
variables: {
|
||||
input
|
||||
input,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user