fix(subsonic): only return one bookmark entry per row in getBookmarks

fixes #310

https://gitlab.com/ultrasonic/ultrasonic/-/issues/1113
This commit is contained in:
sentriz
2023-04-21 22:44:50 +01:00
parent d83fe560d3
commit efe72fc447
2 changed files with 9 additions and 9 deletions

View File

@@ -31,17 +31,17 @@ func (c *Controller) ServeGetBookmarks(r *http.Request) *spec.Response {
Type: specid.IDT(bookmark.EntryIDType),
Value: bookmark.EntryID,
}
entries := []*spec.BookmarkEntry{{
entry := spec.BookmarkEntry{
ID: specid,
Type: bookmark.EntryIDType,
}}
}
sub.Bookmarks.List = append(sub.Bookmarks.List, &spec.Bookmark{
Username: user.Name,
Position: bookmark.Position,
Comment: bookmark.Comment,
Created: bookmark.CreatedAt,
Changed: bookmark.UpdatedAt,
Entries: entries,
Entry: entry,
})
}
return sub