[PR #742] [MERGED] refactor: migrate ebook routes #765

Closed
opened 2026-02-25 23:35:23 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/742
Author: @Monirzadeh
Created: 9/29/2023
Status: Merged
Merged: 10/29/2023
Merged by: @fmartingr

Base: masterHead: epub-v1


📝 Commits (10+)

  • 1af16bc add new api
  • a922bb7 UI use new API
  • 4b78818 remove legacy route
  • a9c541c Merge branch 'master' into epub-v1
  • 2cedf3c Merge branch 'master' into epub-v1
  • ace7de2 fix request to new api destination and read that response
  • b6c0bb4 feat: allow authentication using cookies
  • 6dc3d80 fix: return proper error on validatesession
  • df8da02 typo: secret key envionment variable in makefile
  • 97a9232 Merge branch 'feat/cookie-auth' into epub-v1

📊 Changes

18 files changed (+610 additions, -295 deletions)

View changed files

📝 Makefile (+1 -1)
📝 docs/swagger/docs.go (+112 -0)
📝 docs/swagger/swagger.json (+112 -0)
📝 docs/swagger/swagger.yaml (+73 -0)
📝 internal/cmd/update.go (+3 -3)
📝 internal/http/middleware/auth.go (+29 -9)
📝 internal/http/middleware/auth_test.go (+18 -1)
📝 internal/http/routes/api/v1/bookmarks.go (+172 -1)
📝 internal/http/routes/bookmark.go (+52 -2)
📝 internal/http/routes/legacy.go (+0 -6)
📝 internal/http/server.go (+1 -1)
📝 internal/model/model.go (+2 -2)
📝 internal/view/assets/js/page/home.js (+23 -18)
📝 internal/view/login.html (+1 -0)
📝 internal/webserver/handler-api.go (+6 -246)
📝 internal/webserver/handler-ui.go (+3 -3)
📝 internal/webserver/handler.go (+1 -1)
📝 internal/webserver/utils.go (+1 -1)

📄 Description

this Pull request should remove legacy api for ebook.

TODO :

  • API for download ebook
    • force user to login for use this API
    • this will use for batch download ebook in UI
    • other device can send request for specific bookmark and get epub file
    • don't get content from internet each time get that from database.
  • UI update to use new API
    • if you select pdf article it take time. something slow down processes.
  • API for update ebook files
  • API for serve ebook files
  • Batch download use same route as update cache
  • remove part of code that no need them anymore
    this list will be update
  • Update Swagger
  • Add new unit test

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/742 **Author:** [@Monirzadeh](https://github.com/Monirzadeh) **Created:** 9/29/2023 **Status:** ✅ Merged **Merged:** 10/29/2023 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `epub-v1` --- ### 📝 Commits (10+) - [`1af16bc`](https://github.com/go-shiori/shiori/commit/1af16bca4d569190af4f62450b924c45070c59db) add new api - [`a922bb7`](https://github.com/go-shiori/shiori/commit/a922bb7d01ae7f7454d6f78f2fff8167a10052ea) UI use new API - [`4b78818`](https://github.com/go-shiori/shiori/commit/4b7881827a0713931e7edde1b3698987e8d8f067) remove legacy route - [`a9c541c`](https://github.com/go-shiori/shiori/commit/a9c541c1de566736eabde352a6738f200dcfab64) Merge branch 'master' into epub-v1 - [`2cedf3c`](https://github.com/go-shiori/shiori/commit/2cedf3c2b317fb2531e4137a7d5ea91b9fe08861) Merge branch 'master' into epub-v1 - [`ace7de2`](https://github.com/go-shiori/shiori/commit/ace7de2c88d5396cf9f86e947baebe43920d4c54) fix request to new api destination and read that response - [`b6c0bb4`](https://github.com/go-shiori/shiori/commit/b6c0bb4345cedfc9aa0bb0460556f7f12e3be5e8) feat: allow authentication using cookies - [`6dc3d80`](https://github.com/go-shiori/shiori/commit/6dc3d801575a7dd7f31afe1bf6e9743c23fb0252) fix: return proper error on validatesession - [`df8da02`](https://github.com/go-shiori/shiori/commit/df8da021cb52783139443f9c0d80a4c6981522f4) typo: secret key envionment variable in makefile - [`97a9232`](https://github.com/go-shiori/shiori/commit/97a923233fd46529fe2bad63d3977fe17292d673) Merge branch 'feat/cookie-auth' into epub-v1 ### 📊 Changes **18 files changed** (+610 additions, -295 deletions) <details> <summary>View changed files</summary> 📝 `Makefile` (+1 -1) 📝 `docs/swagger/docs.go` (+112 -0) 📝 `docs/swagger/swagger.json` (+112 -0) 📝 `docs/swagger/swagger.yaml` (+73 -0) 📝 `internal/cmd/update.go` (+3 -3) 📝 `internal/http/middleware/auth.go` (+29 -9) 📝 `internal/http/middleware/auth_test.go` (+18 -1) 📝 `internal/http/routes/api/v1/bookmarks.go` (+172 -1) 📝 `internal/http/routes/bookmark.go` (+52 -2) 📝 `internal/http/routes/legacy.go` (+0 -6) 📝 `internal/http/server.go` (+1 -1) 📝 `internal/model/model.go` (+2 -2) 📝 `internal/view/assets/js/page/home.js` (+23 -18) 📝 `internal/view/login.html` (+1 -0) 📝 `internal/webserver/handler-api.go` (+6 -246) 📝 `internal/webserver/handler-ui.go` (+3 -3) 📝 `internal/webserver/handler.go` (+1 -1) 📝 `internal/webserver/utils.go` (+1 -1) </details> ### 📄 Description this Pull request should remove legacy api for ebook. # TODO : - [x] API for download ebook - [x] force user to login for use this API - [x] this will use for batch download ebook in UI - [x] other device can send request for specific bookmark and get epub file - [ ] don't get content from internet each time get that from database. - [x] UI update to use new API - [x] if you select pdf article it take time. something slow down processes. - [x] API for update ebook files - [x] API for serve ebook files - [x] Batch download use same route as update cache - [x] remove part of code that no need them anymore _this list will be update_ - [x] Update Swagger - [ ] Add new unit test --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:35:23 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#765
No description provided.