💚 change build platform
This commit is contained in:
@ -7,7 +7,7 @@ import (
|
||||
|
||||
type Account struct {
|
||||
Name string `json:"name" gorm:"primaryKey" validate:"required"`
|
||||
Index int `json:"index" validate:"required"`
|
||||
Index int `json:"index"`
|
||||
Type string `json:"type"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
@ -28,8 +28,8 @@ type Account struct {
|
||||
Zone string `json:"zone"`
|
||||
RedirectUri string `json:"redirect_uri"`
|
||||
SiteUrl string `json:"site_url"`
|
||||
SiteId string
|
||||
OnedriveType string `json:"onedrive_type"`
|
||||
SiteId string `json:"site_id"`
|
||||
OnedriveType string `json:"onedrive_type"`
|
||||
}
|
||||
|
||||
var accountsMap = map[string]Account{}
|
||||
|
@ -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