diff --git a/src/BirdsiteLive.Common/Settings/ModerationSettings.cs b/src/BirdsiteLive.Common/Settings/ModerationSettings.cs new file mode 100644 index 0000000..ad9fd54 --- /dev/null +++ b/src/BirdsiteLive.Common/Settings/ModerationSettings.cs @@ -0,0 +1,10 @@ +namespace BirdsiteLive.Common.Settings +{ + public class ModerationSettings + { + public string FollowersWhiteListing { get; set; } + public string FollowersBlackListing { get; set; } + public string TwitterAccountsWhiteListing { get; set; } + public string TwitterAccountsBlackListing { get; set; } + } +} \ No newline at end of file diff --git a/src/BirdsiteLive/Startup.cs b/src/BirdsiteLive/Startup.cs index ab50932..5686d12 100644 --- a/src/BirdsiteLive/Startup.cs +++ b/src/BirdsiteLive/Startup.cs @@ -66,7 +66,10 @@ namespace BirdsiteLive var logsSettings = Configuration.GetSection("Logging").Get(); services.For().Use(x => logsSettings); - + + var moderationSettings = Configuration.GetSection("Moderation").Get(); + services.For().Use(x => moderationSettings); + if (string.Equals(dbSettings.Type, DbTypes.Postgres, StringComparison.OrdinalIgnoreCase)) { var connString = $"Host={dbSettings.Host};Username={dbSettings.User};Password={dbSettings.Password};Database={dbSettings.Name}"; diff --git a/src/BirdsiteLive/appsettings.json b/src/BirdsiteLive/appsettings.json index 3dc47ff..3b41952 100644 --- a/src/BirdsiteLive/appsettings.json +++ b/src/BirdsiteLive/appsettings.json @@ -10,12 +10,12 @@ }, "AllowedHosts": "*", "Instance": { - "Name": "BirdsiteLIVE", + "Name": "BirdsiteLIVE", "Domain": "domain.name", "AdminEmail": "me@domain.name", "ResolveMentionsInProfiles": true, - "PublishReplies": false, - "MaxUsersCapacity": 1400 + "PublishReplies": false, + "MaxUsersCapacity": 1400 }, "Db": { "Type": "postgres", @@ -27,5 +27,11 @@ "Twitter": { "ConsumerKey": "twitter.api.key", "ConsumerSecret": "twitter.api.key" + }, + "Moderation": { + "FollowersWhiteListing": null, + "FollowersBlackListing": null, + "TwitterAccountsWhiteListing": null, + "TwitterAccountsBlackListing": null } }