diff options
author | 2024-07-04 22:59:47 +0300 | |
---|---|---|
committer | 2024-07-04 12:59:47 -0700 | |
commit | 92db6913449a57dea9aedbc8670449ae0392943d (patch) | |
tree | 7bc977fa189bf63d5382ddae22a0b6ffb4cef1a2 /internal/storage/integration.go | |
parent | a334c8e6917831bc4e7c92a2e548dd96a3bd7258 (diff) | |
download | v2-92db6913449a57dea9aedbc8670449ae0392943d.tar.gz v2-92db6913449a57dea9aedbc8670449ae0392943d.tar.zst v2-92db6913449a57dea9aedbc8670449ae0392943d.zip |
Add Betula integration
Diffstat (limited to 'internal/storage/integration.go')
-rw-r--r-- | internal/storage/integration.go | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/internal/storage/integration.go b/internal/storage/integration.go index 2b848ac3..5bc20110 100644 --- a/internal/storage/integration.go +++ b/internal/storage/integration.go @@ -197,7 +197,10 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) { raindrop_enabled, raindrop_token, raindrop_collection_id, - raindrop_tags + raindrop_tags, + betula_enabled, + betula_url, + betula_token FROM integrations WHERE @@ -294,6 +297,9 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) { &integration.RaindropToken, &integration.RaindropCollectionID, &integration.RaindropTags, + &integration.BetulaEnabled, + &integration.BetulaURL, + &integration.BetulaToken, ) switch { case err == sql.ErrNoRows: @@ -398,9 +404,12 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error { raindrop_enabled=$85, raindrop_token=$86, raindrop_collection_id=$87, - raindrop_tags=$88 + raindrop_tags=$88, + betula_enabled=$89, + betula_url=$90, + betula_token=$91 WHERE - user_id=$89 + user_id=$92 ` _, err := s.db.Exec( query, @@ -492,6 +501,9 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error { integration.RaindropToken, integration.RaindropCollectionID, integration.RaindropTags, + integration.BetulaEnabled, + integration.BetulaURL, + integration.BetulaToken, integration.UserID, ) @@ -530,7 +542,8 @@ func (s *Storage) HasSaveEntry(userID int64) (result bool) { shaarli_enabled='t' OR webhook_enabled='t' OR omnivore_enabled='t' OR - raindrop_enabled='t' + raindrop_enabled='t' OR + betula_enabled='t' ) ` if err := s.db.QueryRow(query, userID).Scan(&result); err != nil { |