* [sqlite] Added has_content column and relevant migration
* Fix typo in docstring
* [sqlite] Fetch content for bookmarks separately
* [sqlite] Store has_content alongside with bookmark
* [sqlite] Rename variable to distinguish it from main query
* [sqlite] Use by-reference instead of no-op copy
* [sqlite] Reduce queries count from ≈30 to 1 to fetch tags
* Lint fixes
* Make minor logging improvements
* Wrap entire migration in transaction block
* Added «down» migration
* Drop workaround for old SQLite versions
* feat: session expire time from backend
Deduplicated logic from backend and frontend where we needed to take the
login checkbox into account for both back and front codebases. Now the
backend will send the frontend the expire time calculated only in one
place.
This is part of a multi-step process that will store sessions in
database, but this will ease the maintenance of this section for now.
* chore: remove test logger
The import script was pointing to a faulty gist with an error, I've forked and fixed the error as @questor pointed out in the comments and #426.
Fixes#426
Fixed a bug where the content of the article would archive but the
reader version would not be saved due to variable passing. Also made the
code easier to follow by following return principles.
Fixes#406
This commit fixes URL malformation when trying to remove the utm social
query parameters from an URL, which upon finishing and reconstructing
would attach the equal symbol even if the original URL didn't have it.
This is a known Go "bug" [1] that isn't going to be "fixed". I quote
that because server side should behave the same for `?a=&b=1` and
`?a&b=1` for the `a` parameter, but sometimes that's not the case.
[1]: https://github.com/golang/go/issues/20820Fixes#409
* Fix for infinite redirect loop
path.Join trims the trailing slash if the path isn't /, use configured
root instead.
* Add repo root independence
This makes the workflows agnostic of the repository root, making it
possible to build in forked repos.
* Add HTTP request logging
* Fix proper RootPath handler
* Add logging for all resources
This adds proper logging for all resources, including errors. Logging
is on by default, but can be turned off.
* Report effective length of written data
It used an update and insert at the same time, since the virtual table
cannot have constrants nor upserts we need to try an update the
bookmark content to check for it's existence, inserting it only if the
update fails (don't affect any rows).
This will need to be improved in the future, since not all bookmark
updates require modification of the content table (in my case, I was
testing only updating tags).
* feat: async content download when creating via api
Invoking the content download code in a goroutine after saving the
bookmark, this way we can return a response to the user quickly while
the webpage is donwloaded and archived.
Cache api endpont (/api/cache) remains untouched until I understand
the logic behind it.
Also updated the API endpoint for the extension, though I'm unsure why
there's a difference between the "regular" API and the webext API,
they should be using the same APIs.