feat(bot): add proxy error config (#544)
This commit is contained in:
@@ -18,6 +18,7 @@ public class SystemConfigPatch: PatchObject
|
||||
public Partial<int?> GroupLimitOverride { get; set; }
|
||||
public Partial<string[]> DescriptionTemplates { get; set; }
|
||||
public Partial<bool> CaseSensitiveProxyTags { get; set; }
|
||||
public Partial<bool> ProxyErrorMessageEnabled { get; set; }
|
||||
|
||||
|
||||
public override Query Apply(Query q) => q.ApplyPatch(wrapper => wrapper
|
||||
@@ -31,6 +32,7 @@ public class SystemConfigPatch: PatchObject
|
||||
.With("group_limit_override", GroupLimitOverride)
|
||||
.With("description_templates", DescriptionTemplates)
|
||||
.With("case_sensitive_proxy_tags", CaseSensitiveProxyTags)
|
||||
.With("proxy_error_message_enabled", ProxyErrorMessageEnabled)
|
||||
);
|
||||
|
||||
public new void AssertIsValid()
|
||||
@@ -83,6 +85,9 @@ public class SystemConfigPatch: PatchObject
|
||||
if (CaseSensitiveProxyTags.IsPresent)
|
||||
o.Add("case_sensitive_proxy_tags", CaseSensitiveProxyTags.Value);
|
||||
|
||||
if (ProxyErrorMessageEnabled.IsPresent)
|
||||
o.Add("proxy_error_message_enabled", ProxyErrorMessageEnabled.Value);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
@@ -111,6 +116,9 @@ public class SystemConfigPatch: PatchObject
|
||||
if (o.ContainsKey("case_sensitive_proxy_tags"))
|
||||
patch.CaseSensitiveProxyTags = o.Value<bool>("case_sensitive_proxy_tags");
|
||||
|
||||
if (o.ContainsKey("proxy_error_message_enabled"))
|
||||
patch.ProxyErrorMessageEnabled = o.Value<bool>("proxy_error_message_enabled");
|
||||
|
||||
return patch;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user