fix: resource url in rss (#1672)

This commit is contained in:
Stephen Zhou 2023-05-18 06:53:20 +08:00 committed by GitHub
parent 1a8310f027
commit ca5859296a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,7 +108,7 @@ func (s *Server) generateRSSFromMemoList(ctx context.Context, memoList []*api.Me
if resource.ExternalLink != "" { if resource.ExternalLink != "" {
enclosure.Url = resource.ExternalLink enclosure.Url = resource.ExternalLink
} else { } else {
enclosure.Url = baseURL + "/o/r/" + strconv.Itoa(memo.ID) + "/" + resource.PublicID + "/" + resource.Filename enclosure.Url = baseURL + "/o/r/" + strconv.Itoa(resource.ID) + "/" + resource.PublicID + "/" + resource.Filename
} }
enclosure.Length = strconv.Itoa(int(resource.Size)) enclosure.Length = strconv.Itoa(int(resource.Size))
enclosure.Type = resource.Type enclosure.Type = resource.Type