Fixed mutations #162
This commit is contained in:
parent
e9559dec08
commit
b33c5dc9bf
@ -28,8 +28,8 @@ type AutoRoleMutation {
|
||||
}
|
||||
|
||||
input AutoRoleInput {
|
||||
id: ID!
|
||||
channelId: String!
|
||||
messageId: String!
|
||||
serverId: ID!
|
||||
id: ID
|
||||
channelId: String
|
||||
messageId: String
|
||||
serverId: ID
|
||||
}
|
@ -25,8 +25,8 @@ type AutoRoleRuleMutation {
|
||||
}
|
||||
|
||||
input AutoRoleRuleInput {
|
||||
id: ID!
|
||||
emojiName: String!
|
||||
roleId: String!
|
||||
autoRoleId: ID!
|
||||
id: ID
|
||||
emojiName: String
|
||||
roleId: String
|
||||
autoRoleId: ID
|
||||
}
|
@ -25,9 +25,9 @@ type LevelMutation {
|
||||
|
||||
input LevelInput {
|
||||
id: ID
|
||||
name: String!
|
||||
color: String!
|
||||
minXp: Int!
|
||||
permissions: String!
|
||||
serverId: ID!
|
||||
name: String
|
||||
color: String
|
||||
minXp: Int
|
||||
permissions: String
|
||||
serverId: ID
|
||||
}
|
@ -33,6 +33,6 @@ type UserMutation {
|
||||
}
|
||||
|
||||
input UserInput {
|
||||
id: ID!
|
||||
xp: Int!
|
||||
id: ID
|
||||
xp: Int
|
||||
}
|
@ -35,7 +35,7 @@ class AutoRoleMutation(QueryABC):
|
||||
and x.discord_message_id == input["messageId"]
|
||||
)
|
||||
|
||||
return self._auto_roles.get_auto_roles_by_server_id(auto_role.server.server_id).where(get_new)
|
||||
return self._auto_roles.get_auto_roles_by_server_id(auto_role.server.server_id).where(get_new).last()
|
||||
|
||||
def resolve_update_auto_role(self, *_, input: dict):
|
||||
auto_role = self._auto_roles.get_auto_role_by_id(input["id"])
|
||||
|
@ -37,8 +37,10 @@ class AutoRoleRuleMutation(QueryABC):
|
||||
and x.role_id == input["roleId"]
|
||||
)
|
||||
|
||||
return self._auto_roles.get_auto_role_rules_by_auto_role_id(auto_role_rule.auto_role.auto_role_id).where(
|
||||
get_new
|
||||
return (
|
||||
self._auto_roles.get_auto_role_rules_by_auto_role_id(auto_role_rule.auto_role.auto_role_id)
|
||||
.where(get_new)
|
||||
.last()
|
||||
)
|
||||
|
||||
def resolve_update_auto_role_rule(self, *_, input: dict):
|
||||
|
@ -42,7 +42,7 @@ class LevelMutation(QueryABC):
|
||||
and l.permissions == level.permissions
|
||||
)
|
||||
|
||||
return self._levels.get_levels_by_server_id(level.server.server_id).where(get_new_level)
|
||||
return self._levels.get_levels_by_server_id(level.server.server_id).where(get_new_level).last()
|
||||
|
||||
def resolve_update_level(self, *_, input: dict):
|
||||
level = self._levels.get_level_by_id(input["id"])
|
||||
|
Loading…
Reference in New Issue
Block a user