mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: revert hide ask ai button (#1539)
This commit is contained in:
@@ -56,10 +56,6 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
|
||||
},
|
||||
StorageServiceID: api.DatabaseStorage,
|
||||
LocalStoragePath: "",
|
||||
OpenAIConfig: api.OpenAIConfig{
|
||||
Key: "",
|
||||
Host: "",
|
||||
},
|
||||
}
|
||||
|
||||
systemSettingList, err := s.Store.FindSystemSettingList(ctx, &api.SystemSettingFind{})
|
||||
@@ -99,13 +95,6 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
|
||||
systemStatus.StorageServiceID = int(baseValue.(float64))
|
||||
} else if systemSetting.Name == api.SystemSettingLocalStoragePathName {
|
||||
systemStatus.LocalStoragePath = baseValue.(string)
|
||||
} else if systemSetting.Name == api.SystemSettingOpenAIConfigName {
|
||||
openAIConfig := api.OpenAIConfig{}
|
||||
err := json.Unmarshal([]byte(systemSetting.Value), &openAIConfig)
|
||||
if err != nil {
|
||||
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to unmarshal system setting open ai config value").SetInternal(err)
|
||||
}
|
||||
systemStatus.OpenAIConfig = openAIConfig
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user