1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

feat(integration): add cubox integration

Signed-off-by: Shaolong Chen <shaolong.chen@outlook.it>
This commit is contained in:
Shaolong Chen 2024-10-18 13:18:17 +08:00 committed by Frédéric Guillot
parent 3b654fefa7
commit 366928b35d
26 changed files with 173 additions and 4 deletions

View file

@ -207,7 +207,9 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
ntfy_api_token,
ntfy_username,
ntfy_password,
ntfy_icon_url
ntfy_icon_url,
cubox_enabled,
cubox_api_link
FROM
integrations
WHERE
@ -314,6 +316,8 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
&integration.NtfyUsername,
&integration.NtfyPassword,
&integration.NtfyIconURL,
&integration.CuboxEnabled,
&integration.CuboxAPILink,
)
switch {
case err == sql.ErrNoRows:
@ -428,9 +432,11 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
ntfy_api_token=$95,
ntfy_username=$96,
ntfy_password=$97,
ntfy_icon_url=$98
ntfy_icon_url=$98,
cubox_enabled=$99,
cubox_api_link=$100
WHERE
user_id=$99
user_id=$101
`
_, err := s.db.Exec(
query,
@ -532,6 +538,8 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
integration.NtfyUsername,
integration.NtfyPassword,
integration.NtfyIconURL,
integration.CuboxEnabled,
integration.CuboxAPILink,
integration.UserID,
)
@ -571,7 +579,8 @@ func (s *Storage) HasSaveEntry(userID int64) (result bool) {
webhook_enabled='t' OR
omnivore_enabled='t' OR
raindrop_enabled='t' OR
betula_enabled='t'
betula_enabled='t' OR
cubox_enabled='t'
)
`
if err := s.db.QueryRow(query, userID).Scan(&result); err != nil {