You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe this is actually the expected behaviour, but running shiori print -j doesn't show a value for imageURL. It only returns ID, url, title, excerpt, public, modified, hasContent, tags, hasArchive, hasEbook, create_archive, and create_ebook.
Expected behavior
Any value for the imageUrl.
To Reproduce
shiori print -j or visit api/v1/bookmarks/
Screenshots
Notes
The text was updated successfully, but these errors were encountered:
Investigation note: I checked this briefly today and the problem is that the old API filled the DTO model with all required field. We need to move this logic into the BookmarksDomain and use that from the API and the CLI.
Fixes#838
Add `imageURL` field to `shiori print -j` command and `api/v1/bookmarks/` endpoint
* **BookmarksDomain**: Add `populateImageURL` method to set `ImageURL` field. Update `GetBookmark` method to call `populateImageURL` method.
* **BookmarksDomain Tests**: Add test for `populateImageURL` method in `TestBookmarkDomain` function.
* **API**: Update `getBookmark` method in `internal/http/routes/api/v1/bookmarks.go` to include `ImageURL` field in response.
* **API Tests**: Add test for `ImageURL` field in `TestReadableeBookmarkContent` function.
* **CLI**: Update `printHandler` function in `internal/cmd/print.go` to get the bookmarks using the `BookmarksDomain` present in `deps` instead of `deps.Database`. Remove the loop that calls `populateImageUrl`.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/go-shiori/shiori/issues/838?shareId=XXXX-XXXX-XXXX-XXXX).
Data
Describe the bug / actual behavior
Maybe this is actually the expected behaviour, but running
shiori print -j
doesn't show a value for imageURL. It only returns ID, url, title, excerpt, public, modified, hasContent, tags, hasArchive, hasEbook, create_archive, and create_ebook.Expected behavior
Any value for the imageUrl.
To Reproduce
shiori print -j
or visitapi/v1/bookmarks/
Screenshots
Notes
The text was updated successfully, but these errors were encountered: