mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-14 02:17:27 -06: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:
parent
e1781ff52e
commit
07d2770995
18 changed files with 283 additions and 77 deletions
|
|
@ -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 == "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue