From 91a7c934e6c646497b08bde27ab6697f5d89776d Mon Sep 17 00:00:00 2001 From: UUBulb <35923940+uubulb@users.noreply.github.com> Date: Mon, 2 Dec 2024 21:10:40 +0800 Subject: [PATCH] fix config default value (#538) * fix config & state fields * revert state --- model/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/model/config.go b/model/config.go index 5759e10..1efe3f3 100644 --- a/model/config.go +++ b/model/config.go @@ -89,6 +89,9 @@ func (c *Config) Read(path string) error { if c.AvgPingCount == 0 { c.AvgPingCount = 2 } + if c.Cover == 0 { + c.Cover = 1 + } if c.JWTSecretKey == "" { c.JWTSecretKey, err = utils.GenerateRandomString(1024) if err != nil {