Added default role handling #360
This commit is contained in:
@@ -44,6 +44,7 @@ type ServerConfigHistory implements HistoryTableQuery {
|
||||
helpVoiceChannelId: String
|
||||
teamChannelId: String
|
||||
loginMessageChannelId: String
|
||||
defaultRoleId: String
|
||||
featureFlagCount: Int
|
||||
featureFlags: [FeatureFlag]
|
||||
|
||||
@@ -92,6 +93,7 @@ input ServerConfigInput {
|
||||
helpVoiceChannelId: String
|
||||
teamChannelId: String
|
||||
loginMessageChannelId: String
|
||||
defaultRoleId: String
|
||||
featureFlags: [FeatureFlagInput]
|
||||
|
||||
afkChannelIds: [String]
|
||||
|
@@ -89,6 +89,9 @@ class ServerConfigMutation(QueryABC):
|
||||
if "loginMessageChannelId" in input
|
||||
else server_config.login_message_channel_id
|
||||
)
|
||||
server_config.default_role_id = (
|
||||
input["defaultRoleId"] if "defaultRoleId" in input else server_config.default_role_id
|
||||
)
|
||||
server_config.feature_flags = (
|
||||
dict(zip([x["key"] for x in input["featureFlags"]], [x["value"] for x in input["featureFlags"]]))
|
||||
if "featureFlags" in input
|
||||
|
Reference in New Issue
Block a user