mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
integration/raindrop: initial draft implementation
This commit is contained in:
parent
7d6a4243c1
commit
ca62b0b36b
26 changed files with 243 additions and 4 deletions
|
@ -193,7 +193,11 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
|
|||
rssbridge_url,
|
||||
omnivore_enabled,
|
||||
omnivore_api_key,
|
||||
omnivore_url
|
||||
omnivore_url,
|
||||
raindrop_enabled,
|
||||
raindrop_token,
|
||||
raindrop_collection_id,
|
||||
raindrop_tags
|
||||
FROM
|
||||
integrations
|
||||
WHERE
|
||||
|
@ -286,6 +290,10 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
|
|||
&integration.OmnivoreEnabled,
|
||||
&integration.OmnivoreAPIKey,
|
||||
&integration.OmnivoreURL,
|
||||
&integration.RaindropEnabled,
|
||||
&integration.RaindropToken,
|
||||
&integration.RaindropCollectionID,
|
||||
&integration.RaindropTags,
|
||||
)
|
||||
switch {
|
||||
case err == sql.ErrNoRows:
|
||||
|
@ -386,9 +394,13 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
|
|||
omnivore_url=$81,
|
||||
linkwarden_enabled=$82,
|
||||
linkwarden_url=$83,
|
||||
linkwarden_api_key=$84
|
||||
linkwarden_api_key=$84,
|
||||
raindrop_enabled=$85,
|
||||
raindrop_token=$86,
|
||||
raindrop_collection_id=$87,
|
||||
raindrop_tags=$88
|
||||
WHERE
|
||||
user_id=$85
|
||||
user_id=$89
|
||||
`
|
||||
_, err := s.db.Exec(
|
||||
query,
|
||||
|
@ -476,6 +488,10 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
|
|||
integration.LinkwardenEnabled,
|
||||
integration.LinkwardenURL,
|
||||
integration.LinkwardenAPIKey,
|
||||
integration.RaindropEnabled,
|
||||
integration.RaindropToken,
|
||||
integration.RaindropCollectionID,
|
||||
integration.RaindropTags,
|
||||
integration.UserID,
|
||||
)
|
||||
|
||||
|
@ -513,7 +529,8 @@ func (s *Storage) HasSaveEntry(userID int64) (result bool) {
|
|||
readeck_enabled='t' OR
|
||||
shaarli_enabled='t' OR
|
||||
webhook_enabled='t' OR
|
||||
omnivore_enabled='t'
|
||||
omnivore_enabled='t' OR
|
||||
raindrop_enabled='t'
|
||||
)
|
||||
`
|
||||
if err := s.db.QueryRow(query, userID).Scan(&result); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue