mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: storage service backend (#1086)
* feat: storage service backend * update go.mod * update the column name (urlPrefix -> url_prefix) * update * update
This commit is contained in:
@ -23,6 +23,8 @@ const (
|
||||
SystemSettingAdditionalScriptName SystemSettingName = "additionalScript"
|
||||
// SystemSettingCustomizedProfileName is the key type of customized server profile.
|
||||
SystemSettingCustomizedProfileName SystemSettingName = "customizedProfile"
|
||||
// SystemSettingStorageServiceName is the key type of sotrage service name.
|
||||
SystemSettingStorageServiceName SystemSettingName = "storageServiceName"
|
||||
)
|
||||
|
||||
// CustomizedProfile is the struct definition for SystemSettingCustomizedProfileName system setting item.
|
||||
@ -55,6 +57,8 @@ func (key SystemSettingName) String() string {
|
||||
return "additionalScript"
|
||||
case SystemSettingCustomizedProfileName:
|
||||
return "customizedProfile"
|
||||
case SystemSettingStorageServiceName:
|
||||
return "storageServiceName"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@ -127,6 +131,8 @@ func (upsert SystemSettingUpsert) Validate() error {
|
||||
if !slices.Contains(UserSettingAppearanceValue, customizedProfile.Appearance) {
|
||||
return fmt.Errorf("invalid appearance value")
|
||||
}
|
||||
} else if upsert.Name == SystemSettingStorageServiceName {
|
||||
return nil
|
||||
} else {
|
||||
return fmt.Errorf("invalid system setting name")
|
||||
}
|
||||
|
Reference in New Issue
Block a user