Add encrypt subscription ON/OFF switch

This commit is contained in:
Sudo Space
2023-06-11 20:34:27 +03:30
parent 002b8177ec
commit 0650362222
10 changed files with 26 additions and 2 deletions

View File

@@ -49,6 +49,7 @@ var defaultValueMap = map[string]string{
"subCertFile": "",
"subKeyFile": "",
"subUpdates": "12",
"subEncrypt": "true",
}
type SettingService struct {
@@ -367,6 +368,10 @@ func (s *SettingService) GetSubUpdates() (int, error) {
return s.getInt("subUpdates")
}
func (s *SettingService) GetSubEncrypt() (bool, error) {
return s.getBool("subEncrypt")
}
func (s *SettingService) UpdateAllSetting(allSetting *entity.AllSetting) error {
if err := allSetting.CheckValid(); err != nil {
return err