mirror of
https://github.com/wassname/talk.git
synced 2026-07-12 19:10:14 +08:00
applied rename to graph mutation edges
This commit is contained in:
@@ -180,7 +180,7 @@ export const withSuspendUser = withMutation(
|
||||
export const withUnsuspendUser = withMutation(
|
||||
gql`
|
||||
mutation UnSuspendUser($input: UnSuspendUserInput!) {
|
||||
unSuspendUser(input: $input) {
|
||||
unsuspendUser(input: $input) {
|
||||
...UnSuspendUserResponse
|
||||
}
|
||||
}
|
||||
@@ -276,7 +276,7 @@ export const withBanUser = withMutation(
|
||||
export const withUnbanUser = withMutation(
|
||||
gql`
|
||||
mutation UnBanUser($input: UnBanUserInput!) {
|
||||
unBanUser(input: $input) {
|
||||
unbanUser(input: $input) {
|
||||
...UnBanUserResponse
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,13 +34,13 @@ const RootMutation = {
|
||||
suspendUser: async (obj, {input: {id, until, message}}, {mutators: {User}}) => {
|
||||
await User.setUserSuspensionStatus(id, until, message);
|
||||
},
|
||||
unSuspendUser: async (obj, {input: {id}}, {mutators: {User}}) => {
|
||||
unsuspendUser: async (obj, {input: {id}}, {mutators: {User}}) => {
|
||||
await User.setUserSuspensionStatus(id);
|
||||
},
|
||||
banUser: async (obj, {input: {id, message}}, {mutators: {User}}) => {
|
||||
await User.setUserBanStatus(id, true, message);
|
||||
},
|
||||
unBanUser: async (obj, {input: {id}}, {mutators: {User}}) => {
|
||||
unbanUser: async (obj, {input: {id}}, {mutators: {User}}) => {
|
||||
await User.setUserBanStatus(id, false);
|
||||
},
|
||||
ignoreUser: async (_, {id}, {mutators: {User}}) => {
|
||||
|
||||
@@ -1396,7 +1396,7 @@ type RootMutation {
|
||||
|
||||
# Sets the suspension status on a given user. Requires the `MODERATOR` role.
|
||||
# Mutation is restricted.
|
||||
unSuspendUser(input: UnSuspendUserInput!): UnSuspendUserResponse
|
||||
unsuspendUser(input: UnSuspendUserInput!): UnSuspendUserResponse
|
||||
|
||||
# Sets the ban status on a given user. Requires the `MODERATOR` role.
|
||||
# Mutation is restricted.
|
||||
@@ -1404,7 +1404,7 @@ type RootMutation {
|
||||
|
||||
# Sets the ban status on a given user. Requires the `MODERATOR` role.
|
||||
# Mutation is restricted.
|
||||
unBanUser(input: UnBanUserInput!): UnBanUserResponse
|
||||
unbanUser(input: UnBanUserInput!): UnBanUserResponse
|
||||
|
||||
# Sets the username status on a given user to `APPROVED`. Requires the
|
||||
# `MODERATOR` role. Mutation is restricted.
|
||||
|
||||
@@ -46,7 +46,7 @@ describe('graph.mutations.banUser', () => {
|
||||
}
|
||||
|
||||
mutation UnBanUser($user_id: ID!) {
|
||||
unBanUser(input: {
|
||||
unbanUser(input: {
|
||||
id: $user_id
|
||||
}) {
|
||||
errors {
|
||||
@@ -112,7 +112,7 @@ describe('graph.mutations.banUser', () => {
|
||||
console.error(res.errors);
|
||||
}
|
||||
expect(res.errors).to.be.undefined;
|
||||
expect(res.data.unBanUser).to.be.null;
|
||||
expect(res.data.unbanUser).to.be.null;
|
||||
|
||||
user = await UserModel.findOne({id: user.id});
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ describe('graph.mutations.suspendUser', () => {
|
||||
}
|
||||
|
||||
mutation UnSuspendUser($user_id: ID!) {
|
||||
unSuspendUser(input: {
|
||||
unsuspendUser(input: {
|
||||
id: $user_id,
|
||||
}) {
|
||||
errors {
|
||||
@@ -124,7 +124,7 @@ describe('graph.mutations.suspendUser', () => {
|
||||
console.error(res.errors);
|
||||
}
|
||||
expect(res.errors).to.be.undefined;
|
||||
expect(res.data.unSuspendUser).to.be.null;
|
||||
expect(res.data.unsuspendUser).to.be.null;
|
||||
|
||||
user = await UserModel.findOne({id: user.id});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user