mirror of
https://github.com/go-shiori/shiori.git
synced 2026-04-25 06:25:54 +03:00
[PR #639] [MERGED] feat: allow per-user settings and store them in database #708
Labels
No labels
component:backend
component:builds
component:builds
component:extension
component:frontend
component:readability
database
database:mysql
database:postgres
database:sqlite
feature:ebooks
github_actions
good first issue
hacktoberfest
note:duplicate?
note:fixed?
note:out-of-scope?
os:windows
priority:high
priority:low
pull-request
resolution:as-intended
resolution:cant-reproduce
resolution:duplicate
resolution:fixed
resolution:wontfix
tag:TBD
tag:big-task
tag:help-wanted
tag:huge-data
tag:meta
tag:more-info
tag:next
tag:no-stale
tag:requires-migrations
tag:research
tag:security 🛡️
tag:stale
tag:waiting-for-assignee
type:bug
type:documentation
type:enhancement
type:meta
type:ux
user:cli
user:web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shiori#708
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/go-shiori/shiori/pull/639
Author: @Monirzadeh
Created: 7/9/2023
Status: ✅ Merged
Merged: 10/15/2023
Merged by: @fmartingr
Base:
master← Head:settings-per-user📝 Commits (10+)
3d5778fcreate needed field in sqlite databasec574a7eupdate account model53314e5update Account struct for save Account optionsab0b922update sqlite database return account settingsc6fdddcsave configure in sqlite as text and return that8d68fb5read configure from user account and defualt configure for shiorif32dfd8add api/ui for update settings in database user can save settings in database (in sqlite database)c106749check configures be in json format before save in database440a125support MariaDBb872736fix wrong comment📊 Changes
29 files changed (+906 additions, -117 deletions)
View changed files
📝
docs/swagger/docs.go(+72 -0)📝
docs/swagger/swagger.json(+72 -0)📝
docs/swagger/swagger.yaml(+46 -0)📝
internal/database/database.go(+3 -0)📝
internal/database/migrations/mysql/0001_initial.up.sql(+4 -4)➕
internal/database/migrations/mysql/0005_config.down.sql(+1 -0)➕
internal/database/migrations/mysql/0005_config.up.sql(+2 -0)📝
internal/database/migrations/postgres/0001_initial.up.sql(+1 -1)➕
internal/database/migrations/postgres/0002_config.down.sql(+1 -0)➕
internal/database/migrations/postgres/0002_config.up.sql(+2 -0)➕
internal/database/migrations/sqlite/0003_config.down.sql(+1 -0)➕
internal/database/migrations/sqlite/0003_config.up.sql(+3 -0)📝
internal/database/mysql.go(+15 -4)📝
internal/database/mysql_test.go(+117 -0)📝
internal/database/pg.go(+16 -4)📝
internal/database/pg_test.go(+116 -0)📝
internal/database/sqlite.go(+21 -5)📝
internal/database/sqlite_test.go(+102 -0)📝
internal/http/routes/api/v1/auth.go(+36 -0)📝
internal/http/routes/api/v1/auth_test.go(+110 -0)...and 9 more files
📄 Description
First step for real separate user in Shiori.
The goal is to move each user settings to the database and call each setting separately for each user.
I'm done some part of code but not push yet (it is not clean). It will be completed step by step until be ready for merge.
Why we need this?
TODO:
SaveAccounttoSaveAccountSettingsandconfigurestoconfigdriver.valuerRepeat for other database
What I need to know?
Should I change current API for update settings or create new one?Things make work unnecessary harder
current first user logicfirst user (shiori with gopher) have problem before save that in database if user save new settings. Kinda bug in current logic be sure it solved.after version 1.6 it not a problem anymore.Should be checked before merge:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.