mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: use resource name in frontend
This commit is contained in:
@@ -27,7 +27,8 @@ import (
|
||||
)
|
||||
|
||||
type Resource struct {
|
||||
ID int32 `json:"id"`
|
||||
ID int32 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
|
||||
// Standard fields
|
||||
CreatorID int32 `json:"creatorId"`
|
||||
@@ -368,6 +369,7 @@ func replacePathTemplate(path, filename string) string {
|
||||
func convertResourceFromStore(resource *store.Resource) *Resource {
|
||||
return &Resource{
|
||||
ID: resource.ID,
|
||||
Name: resource.ResourceName,
|
||||
CreatorID: resource.CreatorID,
|
||||
CreatedTs: resource.CreatedTs,
|
||||
UpdatedTs: resource.UpdatedTs,
|
||||
|
@@ -138,7 +138,7 @@ func (s *APIV1Service) generateRSSFromMemoList(ctx context.Context, memoList []*
|
||||
if resource.ExternalLink != "" {
|
||||
enclosure.Url = resource.ExternalLink
|
||||
} else {
|
||||
enclosure.Url = baseURL + "/o/r/" + fmt.Sprintf("%d", resource.ID)
|
||||
enclosure.Url = baseURL + "/o/r/" + resource.Name
|
||||
}
|
||||
enclosure.Length = strconv.Itoa(int(resource.Size))
|
||||
enclosure.Type = resource.Type
|
||||
|
Reference in New Issue
Block a user