mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Change instance-stats-randomize
to instance-stats-mode
with multiple options; implement nodeinfo 2.1 (#3734)
* [feature] Change `instance-stats-randomize` to `instance-stats-mode` with multiple options; implement nodeinfo 2.1 * swaggalaggadingdong
This commit is contained in:
@@ -115,6 +115,19 @@ func Validate() error {
|
||||
SetInstanceLanguages(parsedLangs)
|
||||
}
|
||||
|
||||
// `instance-stats-mode` should be
|
||||
// "", "zero", "serve", or "baffle"
|
||||
switch statsMode := GetInstanceStatsMode(); statsMode {
|
||||
case InstanceStatsModeDefault, InstanceStatsModeZero, InstanceStatsModeServe, InstanceStatsModeBaffle:
|
||||
// No problem.
|
||||
|
||||
default:
|
||||
errf(
|
||||
"%s must be set to empty string, zero, serve, or baffle, provided value was %s",
|
||||
InstanceFederationModeFlag(), statsMode,
|
||||
)
|
||||
}
|
||||
|
||||
// `web-assets-base-dir`.
|
||||
webAssetsBaseDir := GetWebAssetBaseDir()
|
||||
if webAssetsBaseDir == "" {
|
||||
|
Reference in New Issue
Block a user