Commit graph

32 commits

Author SHA1 Message Date
Felipe Martin
cc7c75116d
refactor: migrate bookmark static pages to new http server (#775)
* migrate bookmark content route to new http server

* new archive page

* remove unused go generate comment

* database mock

* utils cleanup

* unused var

* domains refactor and tests

* fixed secret key type

* redirect to login on ui errors

* fixed archive folder with storage domain

* webroot documentation

* some bookmark route tests

* fixed error in bookmark domain for non existant bookmarks

* centralice errors

* add coverage data to unittests

* added tests, refactor storage to use afero

* removed mock to avoid increasing complexity

* using deps to copy files around

* remove config usage (to deps)

* remove handler-ui file
2023-12-28 18:18:32 +01:00
Monirzadeh
5e9847a288
refactor: migrate ebook routes to new http server (#742)
* add new api

* UI use new API

* remove legacy route

* fix request to new api destination and read that response

* feat: allow authentication using cookies

* fix: return proper error on validatesession

* typo: secret key envionment variable in makefile

* serve ebook file with new api

* cache update use new api path

* add skipexist and batch download use same route as cache

* fix bug - update hasebook status

* remove unneeded part of code

* add swagger documentation

* fix swagger documentation

* fix swagger response

* better statuscode

* fix swagger documentation

* covert to snake_case

* recover coverage.txt that remove

---------

Co-authored-by: Felipe M <me@fmartingr.com>
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2023-10-29 11:57:07 +01:00
Felipe Martin
a60dbf3dc5
Run legacy API and new API at the same time. (#648)
* 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
2023-07-19 18:25:41 +02:00
Felipe Martin Garcia
05fee53bd0
fix: saving bookmarks inconsistencies (#500)
* chore: updated go-migrate dependencies

* fix: specify if we're saving bookmarks expecting a creation

up until now the SaveBookmarks method was doing some "magic" to do
"upserts" on the databases, but consistency between engines was scarce
and not knowing if we were expecting saving a new bookmark or updating
an existing one was leading to errors and inconsistencies in logic all
around the place. Now we need to specify a creation boolean when
saving and a differnt query will be make (INSERT vs UPDATE).

* fix(api): using incorrect bookmark for content downlaod

* test(db): added test pipeline for databases

Added functions that will share logic among the engines and will be
called on fresh databases on each test run

* dev: added basic docker-compose for development

* chore: uncommented tests

* ci(test): added mysql service

* typo

* test(mysql): select database after reset

* fix(mysql): ignore empty row errors when parsing tags

* fix(mysql): handle insert errors

* chore: added mysql variables to compose

* ci: explicit mysql service port exposed
2022-10-11 23:47:38 +02:00
hulb
09f2465065
refactor:pass ctx to db layer, return err instead of recover panic (#450) 2022-09-30 12:19:36 +02:00
Dean Jackson
4ff6ddd65a
Merge pull request #246 from Midek/master
update url also when offline mode
2020-08-06 22:28:04 +02:00
Dean Jackson
a0ce725167 Exit with non-zero status when add fails 2020-08-06 21:12:34 +02:00
Midov
3fe593d2e7 update url also when offline mode 2020-05-04 00:29:44 +02:00
Radhi Fadlillah
fbd4e37643 Fix custom title and excerpt doesn't saved 2019-09-22 16:17:51 +07:00
Radhi Fadlillah
018f33228a Fix import skipped when title missing #153 2019-09-22 10:55:22 +07:00
Radhi Fadlillah
f68835fdef Minor improvement in cmd description 2019-09-20 17:27:49 +07:00
Radhi Fadlillah
64c62d6b12 Remove repeated code for archiving bookmarks 2019-09-20 16:48:57 +07:00
Radhi Fadlillah
a5b4f78f10 Fix typo 2019-08-30 11:43:53 +07:00
Radhi Fadlillah
11c6680397 Add options to keep title and excerpt when update 2019-08-10 20:13:13 +07:00
Radhi Fadlillah
ad502c6749 Add portable mode 2019-08-09 10:19:43 +07:00
Radhi Fadlillah
af1a32ac4f Now only fetch text content if page is readable 2019-08-05 20:22:27 +07:00
Radhi Fadlillah
f35325ba48 Make add and updateworks on non HTML file 2019-06-10 20:15:09 +07:00
Radhi Fadlillah
a88a25c41a Make no-archival flags works 2019-06-10 15:49:54 +07:00
Radhi Fadlillah
10ddb3fbbe Use gzip which make archive 1/3 smaller 2019-06-10 07:01:53 +07:00
Radhi Fadlillah
b1464bd89b Add flags for seeing log 2019-06-10 00:20:24 +07:00
Radhi Fadlillah
0efe7eae82 Fix: confirmation not show up on batch update 2019-06-10 00:06:51 +07:00
Radhi Fadlillah
94b59a29a7 Refactor archiver 2019-06-09 22:49:25 +07:00
Radhi Fadlillah
89cc8caa23 Confirm to user for batch updating archive 2019-06-09 17:20:51 +07:00
Radhi Fadlillah
dd4c10732a Minor doc fix 2019-06-09 17:02:16 +07:00
Radhi Fadlillah
f4a0ee8e22 Before updating, remove the old archive 2019-06-09 16:59:03 +07:00
Radhi Fadlillah
4e38387170 Add initial archiver 2019-06-09 14:54:07 +07:00
Radhi Fadlillah
c3ce7cd603 Show which book that fail to download when updating 2019-05-24 17:13:19 +07:00
Radhi Fadlillah
e65dd220d4 Better image download 2019-05-24 13:25:29 +07:00
Radhi Fadlillah
80f117c337 Better log message in update 2019-05-23 23:56:38 +07:00
Radhi Fadlillah
b2a3d444d3 Minor fix: wrong log message 2019-05-22 16:17:04 +07:00
Radhi Fadlillah
9a9baf9f91 Implement logic for update cmd 2019-05-22 16:13:52 +07:00
Radhi Fadlillah
1e099fbd27 Restructure project directories 2019-05-21 10:31:40 +07:00