mirror of
https://github.com/wassname/talk.git
synced 2026-08-16 11:29:31 +08:00
Now using changeUsername
This commit is contained in:
@@ -3,7 +3,7 @@ import {createDefaultResponseFragments} from '../utils';
|
||||
// fragments defined here are automatically registered.
|
||||
export default {
|
||||
...createDefaultResponseFragments(
|
||||
'SetUsernameResponse',
|
||||
'ChangeUsernameResponse',
|
||||
'SetUserBanStatusResponse',
|
||||
'SetUserSuspensionStatusResponse',
|
||||
'SetCommentStatusResponse',
|
||||
|
||||
@@ -196,16 +196,16 @@ export const withRejectUsername = withMutation(
|
||||
})
|
||||
});
|
||||
|
||||
export const withSetUsername = withMutation(
|
||||
export const withChangeUsername = withMutation(
|
||||
gql`
|
||||
mutation RejectUsername($id: ID!, $username: String!) {
|
||||
setUsername(id: $id, username: $username) {
|
||||
...SetUsernameResponse
|
||||
mutation ChangeUsername($id: ID!, $username: String!) {
|
||||
changeUsername(id: $id, username: $username) {
|
||||
...ChangeUsernameResponse
|
||||
}
|
||||
}
|
||||
`, {
|
||||
props: ({mutate}) => ({
|
||||
setUsername: (id, username) => {
|
||||
changeUsername: (id, username) => {
|
||||
return mutate({
|
||||
variables: {
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user