* config: backwards comptabile dir
* remove duplicated frontend
* frontend: move assets to assets folder
* legacy routes handler in gin
* templates and asset in different embed
* new routes
* frontend routes serve old views
* added DTO for account object
* api auth calls legacy handler
* frontend: handle new error messages
* frontend: update urls
* frontend: login using new api
* updated frontend tests
* chore: remove debug route
* create shiori/gopher user if no owner is present
* server as default command
* serve -> server
* refactored database logic, allow database url
* removed unused configuration
* storage docs
* refactor cli to use cfg and deps
* check errors only in server
* log fatal instead of os exit
* dont default data directory to current dir
* fixed sqlite path
* trigger build on prs
* avoid releasing if lint/test fails
* pull request condition
* event -> event_name
* Get correct pull request number
* added workflow to delete dangling tags
* fix: nil error checking
* set gin mode first
* set gin mode before initialization
* fix logger
* allow version bump from custom ref
* Updated matrix link to workspace
* feat: add SHIORI_PG_SSLMODE
Some managed hosting providers don't support sslmode=disabled.
* handle empty value
---------
Co-authored-by: Felipe M <me@fmartingr.com>
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
* generate ebook
* serve ebook file
* Update ebook.go not download same image twice anymore
* download ebook request api/ui part
* fix typo
* add stylesheet
* update hasEbook status
* download link update after ebook generate
update bookmark command in ui
* download ebook with bookmark title
* Apply suggestions from code review for better error handling
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
* Update internal/view/js/page/home.js fix typo
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
* import error lib and retuen missing error
* move ebook download action to update cache
* replace io/ioutil with io
* add missing error handling
* update Archive now always update ebook
* replace panic error with 404
* remove ebook with delete action
* add download ebook link to content page
* remove tags that not work correctly right now
* if file is pdf not generate ebook
* update style.css
* Revert "update style.css"
This reverts commit 519e10d6ce.
* remove download limit for api
* fix missing fmt.Errorf and change to errors.Wrap
* fix double panic
* return 404 if bookmark not exist
* change function name to GenerateEbook
* not isFatalErr anymore
* add unit test
* remove uneeded field for unit test
---------
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
* thumb image will be not accesable anymore if it is private fix#578
* Update internal/webserver/handler-ui.go better error handling
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
---------
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
* fix(real_ip): get user real ip from headers of request
* fix(real_ip): compatible with those header with multiple IP values separated by commas
* test(real_ip): add benchmark for IPv4 and IPv6 private address check
* fix(real_ip): check empty, then remove leading and tailing comma char, finally locate first IP field
* test(real_ip): move checker logic into utils and add more unit test cases
* test(real_ip): write unit tests covering all code branches of the `util-ip` module
* refactor(real_ip): use one-line `testify.assert.Panics` to capture intended panic in test case
* chore(real_ip): add module private variable `UserRealIpHeaderCandidates`
put those headers together, make it easy to manage in one place
* doc(real_ip): write docstring for each function in the `utils-ip` module
* chore(real_ip): choose more concrete and unambiguous name for test helper function
It is to avoid polluting the module name-space with too general names.
* chore(naming): change function names according to code style
* refactor(real_ip): simplify the code indicated by 'gosimple' and `golangci`
* chore(naming): rename the `utils-ip` file to `utils_ip` to match with the rest of the file structure
---------
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
* fix(sqlite): avoid using dash in fts5 queries
* test(db): get bookmarks and count with dash in keyword
* test(db): common and ad-hoc sqlite test case