Browse Source

refactor: Blacklisted station names config for community stations only

Owen Diffey 3 năm trước cách đây
mục cha
commit
1e23719673
2 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 1 1
      .wiki/Configuration.md
  2. 2 1
      backend/logic/actions/stations.js

+ 1 - 1
.wiki/Configuration.md

@@ -40,7 +40,7 @@ Location: `backend/config/default.json`
 | `cookie.domain` | The ip or address you use to access the site, without protocols (http/https), so for example `localhost`. |
 | `cookie.secure` | Should be `true` for SSL connections, and `false` for normal http connections. |
 | `cookie.SIDname` | Name of the cookie stored for sessions. |
-| `blacklistedStationNames` | Array of blacklisted station names. |
+| `blacklistedCommunityStationNames ` | Array of blacklisted community station names. |
 | `skipConfigVersionCheck` | Skips checking if the config version is outdated or not. Should almost always be set to false. |
 | `skipDbDocumentsVersionCheck` | Skips checking if there are any DB documents outdated or not. Should almost always be set to false. |
 | `debug.stationIssue` | If set to `true` it will enable the `/debug_station` API endpoint on the backend, which provides information useful to debugging stations not skipping, as well as capure all jobs specified in `debug.captureJobs`. 

+ 2 - 1
backend/logic/actions/stations.js

@@ -2579,7 +2579,8 @@ export default {
 			"station"
 		];
 
-		if (config.get("blacklistedStationNames")) blacklist = [...blacklist, ...config.get("blacklistedStationNames")];
+		if (data.type === "community" && config.get("blacklistedCommunityStationNames "))
+			blacklist = [...blacklist, ...config.get("blacklistedCommunityStationNames")];
 
 		async.waterfall(
 			[