feat: publish v1.0.0-rc.36-custom.1
This commit is contained in:
commit
3a7e8f3b54
2381 files changed
+551494
No files matched your search
@@ -0,0 +1,26 @@
|
||||
package system_setting
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/QuantumNous/new-api/setting/config"
|
||||
)
|
||||
|
||||
type TelegramSettings struct {
|
||||
ClientID string `json:"client_id"`
|
||||
ClientSecret string `json:"client_secret"`
|
||||
}
|
||||
|
||||
var telegramSettings TelegramSettings
|
||||
|
||||
func init() {
|
||||
config.GlobalConfig.Register("telegram", &telegramSettings)
|
||||
}
|
||||
|
||||
func GetTelegramSettings() *TelegramSettings {
|
||||
return &telegramSettings
|
||||
}
|
||||
|
||||
func (s *TelegramSettings) IsConfigured() bool {
|
||||
return strings.TrimSpace(s.ClientID) != "" && strings.TrimSpace(s.ClientSecret) != ""
|
||||
}
|
||||
Reference in new issue
Block a user