* refactor: tags api into v1 api
* feat: tags api huge refactor
* fix: pg & sqlite tests
* tests: added more tests
* fix: bug on mysql bookmark and tag creation
* test: re-enabled test
* tests: slices test
* tests: model bookmarks
* test: use filepath.Join for path construction in bookmark tests
* list account and create account
* deleteaccount (wip)
* remove old accounts code
* fix from merge
* remove serve method from makefile
* ListAccounts, password hash on domain
* make lint
* more permissive assertion
* rename test
* update account
* Authorization
* updated api calls
* apis, pointers, auth
* swagger
* stylecheck
* domain validation
* tests
* swagger
* error handling
* fix system account changes
* Cleanup database interface
* test cleanup
* fixed nil references
* feat: Add logout endpoint to auth routes
* feat: Add logoutHandler for stateless JWT token logout
* fixed some bug catched in tests
* auth/account patch
* prettier
* remove test logs
* fixed incorrect number of parameters
* fixed swagger docs
* enable swagger in dev environment
* errors.Wrap -> fmt.Errorf
* test: Add comprehensive test cases for accounts API handlers
* fix: Resolve test failures in accounts_test.go
* test: Add tests for duplicate username handling in account creation and update
* feat: Add username uniqueness checks for account creation and update
refactor: Improve username existence checks in SQLite account methods
* linted
* test: Add comprehensive tests for auth domain token and credential validation
* test: Add comprehensive test cases for auth domain token creation and validation
* test: Add comprehensive error handling test cases for accounts domain
* refactor: Remove `SaveAccountSettings` method from database implementations
* test: Add test cases for password update functionality
* test(e2e): auth login
* lint
* send regular context to domain
* fixed e2e auth tests
* test: Add auth_test.go for end-to-end authentication testing
* feat: Add comprehensive authentication tests using Playwright and testcontainers
* fix: Handle multiple return values in Playwright test methods
* error message
* e2e playwrigth tests
* ci: setup playwrigth
* refactor: Update Playwright tests to use locator-based API
* refactor: Remove unnecessary alias for playwright-go expect import
* refactor: Replace deprecated expect package with WaitFor() method in Playwright tests
* fix: Resolve linting issues in e2e Playwright tests
* remove npm ci from e2e ci
* make playwright available in path
* typo
* re enabled ci
* base e2e accounts test
* more account e2e
* feat: Add HTML test reporter with screenshots and detailed results
* feat: Embed screenshots as base64 in HTML test report
* refactor: Remove GitHub step summary functionality from test helper
* refactor: Make reporter global to share test results across test helpers
* refactor: Add HandleSuccess method to TestHelper for consistent test result reporting
* feat: Add descriptive messages to all test assertions in TestHelper
* test: Add descriptive messages to assertions in accounts_test.go
* test: Add descriptive error messages to assertions in accounts_test.go
* feat: Add descriptive messages to assertions in accounts_test.go
* refactor: Update assertion functions to receive *testing.T as first argument
* refactor: Update accounts_test.go assertions to pass *testing.T argument
* refactor: Update accounts_test.go assertions to use *testing.T argument
* refactor: Update `accounts_test.go` to use `*testing.T` argument in `Require()` calls
* refactor: Update `th.Require()` calls with `t *testing.T` argument in accounts_test.go
* assert helper
* refactor: Refactor `False` test helper to use `Assert` function consistently
* refactor: Refactor `Equal` test helper to use `Assert` function
* refactor: Simplify Error test helper to use Assert function
* refactor: Refactor `NoError` to use `Assert` function for consistent error handling
* typo
* refactor: Differentiate between test cases and assertions in reporter
* refactor: Simplify AddResult method signature and use error message for assertion
* refactor: Simplify test report with focused failure details and screenshots
* refactor: Ensure assertions are always called in PlaywrightRequire helper methods
* refactor: Update test error messages to be action-oriented
* refactor: Update error messages to be more action-oriented in accounts_test.go
* refactor: Update error messages to be action-oriented in accounts_test.go
* refactor: Improve error messages in auth_test.go for better test readability
* refactor: Improve screenshot handling and test result reporting in Playwright test helper
* fix: Improve test reporting with detailed error messages and logging
* refactor: Remove unused runningInCI field from TestHelper struct
* fix: Improve message formatting in Assert method for better reporting
* assertions
* test: Add `Require()` calls to 007 test for improved error handling
* refactor: Update test reporter to include error details and improve HTML rendering
* fix: Properly escape and render base64 screenshot in HTML report
* fix: Correct base64 screenshot rendering in test reporter
* fixed tests + html report
* feat: Add artifact upload for e2e test report
* make lint
* chore: use correct version in user agent
* ci: run e2e after other checks
* chore: remove pre-commit
* sqlite migrate script
* create time just when bookmark added and modified update if change happen
* show added and modified time in footer instead of header
* add bun.lockb that missing
* add migrate for postgres
* add pg support of created time
* change modifed to modifed_at and create to created_at in sqlite
* change modifed to modifed_at and create to created_at in postgre
* add created_at to mariadb
* fix migration file names
* better variable name and more clear code for add modified time if created and modified is not in same day
* add unittest
* add unittest to sure filters work as expected
* index for created_at and modified_at
* build new styles.css
* update swagger documents
* make styles
* change Created and Modified to CreatedAt and ModifiedAt
* fix missing Modified
* fix typo
* missing Modified
* fix typo
* make swagger
* run tests parallel
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
* remove t.Parallel()
* remove dayjs dependency and combine two function
* better unittest name
* fix typo
* diffrnt footer style for login and content page
* use class instead of id
* back parallel
* change duplicate url
* remvoe run Parallel
* make styles
---------
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
* frontend
* fixed Database.DBx return value
* api endpoint
* updated swagger
* fix openbsd variable dereference
* tests
* only load information if user is owner
* memory improvement for other routes
* login page follow browser darkmode settings
* theme change based on selection in settings between follw system , light, dark
* content page follow settings and fix syntax error
* drop down menu color follow current theme
* version number follow theme in login page
* use footer instead of id for version
* replace space with tab
* move theme settings to the top of the list and fix typo
* remove duplicate code and use a function instead
* fix logic of change theme if you select follow system to not need reload anymore
* fix code style with make styles
* fix bug that eventlistener not remove when activate light or dark theme
* less js and add theme with patch by @fmartingr
* remove NightMode config and now everythings control with Theme
* error instead of log if invalid theme selected
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
* remove unneeded part and update swagger documents
---------
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
* add endpoint to serve readable content
* add id and modified time in response
* revert id and modified time
* remove public check status
* chnage 401 to 403
* add basic unittest for readable content
* check response in unittest
* update strcut name and move that above handler
* 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>
* create needed field in sqlite database
* update account model
* update Account struct for save Account options
* update sqlite database return account settings
* save configure in sqlite as text and return that
* read configure from user account and defualt configure for shiori
* add api/ui for update settings in database user can save settings in database (in sqlite database)
* check configures be in json format before save in database
* support MariaDB
* fix wrong comment
* support PostgreSQL
* revert unneeded change in new logic
* change configures to config
* change SaveAccount to SaveAccountSettings
* add migrate database scripts
* change default in migration scrtipts
* update model
* read config field as json from database
* fix parse value config value & update config update
* update default value for new user
* update settings variable name to reflect database value in UI
* fix typo
* not panic if user not exist and update worng comment
* visitor user can update there settings now
* remove unneeded loading dialog
* fix typo
* update function for pg and mysql
* remove IsJson
* move scan method to model
* simplify jsonify
* simplify assignees value to account.Config
* missing part of function
* fix some typo and unneeded field in struct
* add down migrate script for all database
* change createEbook to CreateEbook
* use json instead of text in mysql and postgres
* implement
* remove unneeded part
* remove unneeded jsonify in code
* return SelectContext and GetContext
* remove defualt config in reques for new user it will be set in backend
* New API
* remove legacy API
* remove validateSessionWithoutOwnerStatus
* remove Jsonify function don't need that anymore
* add unit test for database
* update migrate script name
* change put to patch
* return PUT
* fix Patch problem and now use PATCH instead of PUT
* remove unneeded retuen
* more cleaner code for request new settings
* fix bug to handle string in Scan method thanks to fmartingr
* fix Authorization & use GetAccount & remove username from request
* shiori-settings remove and it read from shiori-account
* add swagger documentation
* API unit test
* fix typo
* remove unneeded coment
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
* better Documentation
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
* shiori-toke remove on logout
* fix typo
* add unit test check update config in database
* update swag documentation
* fix swag formaing error
---------
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
* refactor: swagger docs into a folder
* added scripts for the swaggger tasks
* check version and fmt
* CI
* formatted swag comments
* using custom delims
* revert custom delims
* swag 1.16.1
* update swagger docs
* avoid make swagger output
* swagger check
* test
* swag-fmt
* swagger run
* gofmt
* avoid swag-fmt check for now due to inconsistencies with gofmt
* re-enabled by using go fmt afterwards
* use newer swag in CI
* add gopath to path
* using go binary instead of unset env
* alternative
* correct swag version
* formatted
* formatted
* correct go fmt command
* make swagger
* swagger-check -> swag-check
* run swag-check on lint