Improved steam offer #188
This commit is contained in:
@@ -16,6 +16,7 @@ type ServerConfig implements TableWithHistoryQuery {
|
||||
loginMessageChannelId: String
|
||||
defaultRoleId: String
|
||||
shortRoleNameOnlySetHighestRole: Boolean
|
||||
gameOfferNotificationChatId: String
|
||||
featureFlagCount: Int
|
||||
featureFlags: [FeatureFlag]
|
||||
|
||||
@@ -49,6 +50,7 @@ type ServerConfigHistory implements HistoryTableQuery {
|
||||
loginMessageChannelId: String
|
||||
defaultRoleId: String
|
||||
shortRoleNameOnlySetHighestRole: Boolean
|
||||
gameOfferNotificationChatId: String
|
||||
featureFlagCount: Int
|
||||
featureFlags: [FeatureFlag]
|
||||
|
||||
@@ -100,6 +102,7 @@ input ServerConfigInput {
|
||||
loginMessageChannelId: String
|
||||
defaultRoleId: String
|
||||
shortRoleNameOnlySetHighestRole: Boolean
|
||||
gameOfferNotificationChatId: String
|
||||
featureFlags: [FeatureFlagInput]
|
||||
|
||||
afkChannelIds: [String]
|
||||
|
@@ -94,6 +94,11 @@ class ServerConfigMutation(QueryABC):
|
||||
if "shortRoleNameOnlySetHighestRole" in input
|
||||
else server_config.short_role_name_only_set_highest_role
|
||||
)
|
||||
server_config.game_offer_notification_chat_id = (
|
||||
input["gameOfferNotificationChatId"]
|
||||
if "gameOfferNotificationChatId" in input
|
||||
else server_config.game_offer_notification_chat_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
|
||||
|
@@ -29,6 +29,7 @@ class ServerConfigQuery(DataQueryWithHistoryABC):
|
||||
self.set_field(
|
||||
"shortRoleNameOnlySetHighestRole", lambda config, *_: config.short_role_name_only_set_highest_role
|
||||
)
|
||||
self.set_field("gameOfferNotificationChatId", lambda config, *_: config.game_offer_notification_chat_id)
|
||||
self.add_collection(
|
||||
"featureFlag",
|
||||
lambda config, *_: List(any, [{"key": x, "value": config.feature_flags[x]} for x in config.feature_flags]),
|
||||
|
Reference in New Issue
Block a user