1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

feat(integration): support Wallabag tags in database

This commit is contained in:
Kevin Jiang 2025-08-24 15:10:22 +12:00
parent baf8e40152
commit cc7f1a3710
3 changed files with 112 additions and 100 deletions

View file

@ -1151,4 +1151,11 @@ var migrations = [...]func(tx *sql.Tx) error{
_, err = tx.Exec(sql) _, err = tx.Exec(sql)
return err return err
}, },
func(tx *sql.Tx) (err error) {
sql := `
ALTER TABLE integrations ADD COLUMN wallabag_tags text default '';
`
_, err = tx.Exec(sql)
return err
},
} }

View file

@ -29,6 +29,7 @@ type Integration struct {
WallabagClientSecret string WallabagClientSecret string
WallabagUsername string WallabagUsername string
WallabagPassword string WallabagPassword string
WallabagTags string
NunuxKeeperEnabled bool NunuxKeeperEnabled bool
NunuxKeeperURL string NunuxKeeperURL string
NunuxKeeperAPIKey string NunuxKeeperAPIKey string

View file

@ -130,6 +130,7 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
wallabag_client_secret, wallabag_client_secret,
wallabag_username, wallabag_username,
wallabag_password, wallabag_password,
wallabag_tags,
notion_enabled, notion_enabled,
notion_token, notion_token,
notion_page_id, notion_page_id,
@ -254,6 +255,7 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
&integration.WallabagClientSecret, &integration.WallabagClientSecret,
&integration.WallabagUsername, &integration.WallabagUsername,
&integration.WallabagPassword, &integration.WallabagPassword,
&integration.WallabagTags,
&integration.NotionEnabled, &integration.NotionEnabled,
&integration.NotionToken, &integration.NotionToken,
&integration.NotionPageID, &integration.NotionPageID,
@ -384,107 +386,108 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
wallabag_client_secret=$15, wallabag_client_secret=$15,
wallabag_username=$16, wallabag_username=$16,
wallabag_password=$17, wallabag_password=$17,
nunux_keeper_enabled=$18, wallabag_tags=$18,
nunux_keeper_url=$19, nunux_keeper_enabled=$19,
nunux_keeper_api_key=$20, nunux_keeper_url=$20,
googlereader_enabled=$21, nunux_keeper_api_key=$21,
googlereader_username=$22, googlereader_enabled=$22,
googlereader_password=$23, googlereader_username=$23,
telegram_bot_enabled=$24, googlereader_password=$24,
telegram_bot_token=$25, telegram_bot_enabled=$25,
telegram_bot_chat_id=$26, telegram_bot_token=$26,
telegram_bot_topic_id=$27, telegram_bot_chat_id=$27,
telegram_bot_disable_web_page_preview=$28, telegram_bot_topic_id=$28,
telegram_bot_disable_notification=$29, telegram_bot_disable_web_page_preview=$29,
telegram_bot_disable_buttons=$30, telegram_bot_disable_notification=$30,
espial_enabled=$31, telegram_bot_disable_buttons=$31,
espial_url=$32, espial_enabled=$32,
espial_api_key=$33, espial_url=$33,
espial_tags=$34, espial_api_key=$34,
linkace_enabled=$35, espial_tags=$35,
linkace_url=$36, linkace_enabled=$36,
linkace_api_key=$37, linkace_url=$37,
linkace_tags=$38, linkace_api_key=$38,
linkace_is_private=$39, linkace_tags=$39,
linkace_check_disabled=$40, linkace_is_private=$40,
linkding_enabled=$41, linkace_check_disabled=$41,
linkding_url=$42, linkding_enabled=$42,
linkding_api_key=$43, linkding_url=$43,
linkding_tags=$44, linkding_api_key=$44,
linkding_mark_as_unread=$45, linkding_tags=$45,
matrix_bot_enabled=$46, linkding_mark_as_unread=$46,
matrix_bot_user=$47, matrix_bot_enabled=$47,
matrix_bot_password=$48, matrix_bot_user=$48,
matrix_bot_url=$49, matrix_bot_password=$49,
matrix_bot_chat_id=$50, matrix_bot_url=$50,
notion_enabled=$51, matrix_bot_chat_id=$51,
notion_token=$52, notion_enabled=$52,
notion_page_id=$53, notion_token=$53,
readwise_enabled=$54, notion_page_id=$54,
readwise_api_key=$55, readwise_enabled=$55,
apprise_enabled=$56, readwise_api_key=$56,
apprise_url=$57, apprise_enabled=$57,
apprise_services_url=$58, apprise_url=$58,
readeck_enabled=$59, apprise_services_url=$59,
readeck_url=$60, readeck_enabled=$60,
readeck_api_key=$61, readeck_url=$61,
readeck_labels=$62, readeck_api_key=$62,
readeck_only_url=$63, readeck_labels=$63,
shiori_enabled=$64, readeck_only_url=$64,
shiori_url=$65, shiori_enabled=$65,
shiori_username=$66, shiori_url=$66,
shiori_password=$67, shiori_username=$67,
shaarli_enabled=$68, shiori_password=$68,
shaarli_url=$69, shaarli_enabled=$69,
shaarli_api_secret=$70, shaarli_url=$70,
webhook_enabled=$71, shaarli_api_secret=$71,
webhook_url=$72, webhook_enabled=$72,
webhook_secret=$73, webhook_url=$73,
rssbridge_enabled=$74, webhook_secret=$74,
rssbridge_url=$75, rssbridge_enabled=$75,
omnivore_enabled=$76, rssbridge_url=$76,
omnivore_api_key=$77, omnivore_enabled=$77,
omnivore_url=$78, omnivore_api_key=$78,
linkwarden_enabled=$79, omnivore_url=$79,
linkwarden_url=$80, linkwarden_enabled=$80,
linkwarden_api_key=$81, linkwarden_url=$81,
raindrop_enabled=$82, linkwarden_api_key=$82,
raindrop_token=$83, raindrop_enabled=$83,
raindrop_collection_id=$84, raindrop_token=$84,
raindrop_tags=$85, raindrop_collection_id=$85,
betula_enabled=$86, raindrop_tags=$86,
betula_url=$87, betula_enabled=$87,
betula_token=$88, betula_url=$88,
ntfy_enabled=$89, betula_token=$89,
ntfy_topic=$90, ntfy_enabled=$90,
ntfy_url=$91, ntfy_topic=$91,
ntfy_api_token=$92, ntfy_url=$92,
ntfy_username=$93, ntfy_api_token=$93,
ntfy_password=$94, ntfy_username=$94,
ntfy_icon_url=$95, ntfy_password=$95,
ntfy_internal_links=$96, ntfy_icon_url=$96,
cubox_enabled=$97, ntfy_internal_links=$97,
cubox_api_link=$98, cubox_enabled=$98,
discord_enabled=$99, cubox_api_link=$99,
discord_webhook_link=$100, discord_enabled=$100,
slack_enabled=$101, discord_webhook_link=$101,
slack_webhook_link=$102, slack_enabled=$102,
pushover_enabled=$103, slack_webhook_link=$103,
pushover_user=$104, pushover_enabled=$104,
pushover_token=$105, pushover_user=$105,
pushover_device=$106, pushover_token=$106,
pushover_prefix=$107, pushover_device=$107,
rssbridge_token=$108, pushover_prefix=$108,
karakeep_enabled=$109, rssbridge_token=$109,
karakeep_api_key=$110, karakeep_enabled=$110,
karakeep_url=$111, karakeep_api_key=$111,
linktaco_enabled=$112, karakeep_url=$112,
linktaco_api_token=$113, linktaco_enabled=$113,
linktaco_org_slug=$114, linktaco_api_token=$114,
linktaco_tags=$115, linktaco_org_slug=$115,
linktaco_visibility=$116 linktaco_tags=$116,
linktaco_visibility=$117
WHERE WHERE
user_id=$117 user_id=$118
` `
_, err := s.db.Exec( _, err := s.db.Exec(
query, query,
@ -505,6 +508,7 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
integration.WallabagClientSecret, integration.WallabagClientSecret,
integration.WallabagUsername, integration.WallabagUsername,
integration.WallabagPassword, integration.WallabagPassword,
integration.WallabagTags,
integration.NunuxKeeperEnabled, integration.NunuxKeeperEnabled,
integration.NunuxKeeperURL, integration.NunuxKeeperURL,
integration.NunuxKeeperAPIKey, integration.NunuxKeeperAPIKey,