mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: rss link (#1534)
This commit is contained in:
@ -113,6 +113,13 @@ func generateRSSFromMemoList(memoList []*api.Memo, baseURL string, profile *api.
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getSystemCustomizedProfile(ctx context.Context, s *Server) (*api.CustomizedProfile, error) {
|
func getSystemCustomizedProfile(ctx context.Context, s *Server) (*api.CustomizedProfile, error) {
|
||||||
|
systemSetting, err := s.Store.FindSystemSetting(ctx, &api.SystemSettingFind{
|
||||||
|
Name: api.SystemSettingCustomizedProfileName,
|
||||||
|
})
|
||||||
|
if err != nil && common.ErrorCode(err) != common.NotFound {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
customizedProfile := &api.CustomizedProfile{
|
customizedProfile := &api.CustomizedProfile{
|
||||||
Name: "memos",
|
Name: "memos",
|
||||||
LogoURL: "",
|
LogoURL: "",
|
||||||
@ -121,14 +128,10 @@ func getSystemCustomizedProfile(ctx context.Context, s *Server) (*api.Customized
|
|||||||
Appearance: "system",
|
Appearance: "system",
|
||||||
ExternalURL: "",
|
ExternalURL: "",
|
||||||
}
|
}
|
||||||
systemSetting, err := s.Store.FindSystemSetting(ctx, &api.SystemSettingFind{
|
if systemSetting != nil {
|
||||||
Name: api.SystemSettingCustomizedProfileName,
|
if err := json.Unmarshal([]byte(systemSetting.Value), customizedProfile); err != nil {
|
||||||
})
|
return nil, err
|
||||||
if err != nil && common.ErrorCode(err) != common.NotFound {
|
}
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if err := json.Unmarshal([]byte(systemSetting.Value), customizedProfile); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
return customizedProfile, nil
|
return customizedProfile, nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user