mirror of
https://github.com/HChaZZY/alist.git
synced 2025-12-06 11:03:49 +08:00
💚 change build platform
This commit is contained in:
@@ -14,7 +14,7 @@ type SettingItem struct {
|
||||
Key string `json:"key" gorm:"primaryKey" validate:"required"`
|
||||
Value string `json:"value"`
|
||||
Description string `json:"description"`
|
||||
Type string `json:"type"`
|
||||
//Type string `json:"type"`
|
||||
Group int `json:"group"`
|
||||
}
|
||||
|
||||
@@ -22,6 +22,10 @@ func SaveSettings(items []SettingItem) error {
|
||||
return conf.DB.Save(items).Error
|
||||
}
|
||||
|
||||
func SaveSetting(item SettingItem) error {
|
||||
return conf.DB.Save(item).Error
|
||||
}
|
||||
|
||||
func GetSettingsPublic() (*[]SettingItem, error) {
|
||||
var items []SettingItem
|
||||
if err := conf.DB.Where("`group` <> ?", 1).Find(&items).Error; err != nil {
|
||||
|
||||
Reference in New Issue
Block a user