|
|
@@ -157,7 +157,10 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
|
|
|
matrix_bot_user,
|
|
|
matrix_bot_password,
|
|
|
matrix_bot_url,
|
|
|
- matrix_bot_chat_id
|
|
|
+ matrix_bot_chat_id,
|
|
|
+ apprise_enabled,
|
|
|
+ apprise_url,
|
|
|
+ apprise_services_url
|
|
|
FROM
|
|
|
integrations
|
|
|
WHERE
|
|
|
@@ -214,6 +217,9 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
|
|
|
&integration.MatrixBotPassword,
|
|
|
&integration.MatrixBotURL,
|
|
|
&integration.MatrixBotChatID,
|
|
|
+ &integration.AppriseEnabled,
|
|
|
+ &integration.AppriseURL,
|
|
|
+ &integration.AppriseServicesURL,
|
|
|
)
|
|
|
switch {
|
|
|
case err == sql.ErrNoRows:
|
|
|
@@ -278,9 +284,12 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
|
|
|
notion_token=$45,
|
|
|
notion_page_id=$46,
|
|
|
readwise_enabled=$47,
|
|
|
- readwise_api_key=$48
|
|
|
+ readwise_api_key=$48,
|
|
|
+ apprise_enabled=$49,
|
|
|
+ apprise_url=$50,
|
|
|
+ apprise_services_url=$51
|
|
|
WHERE
|
|
|
- user_id=$49
|
|
|
+ user_id=$52
|
|
|
`
|
|
|
_, err := s.db.Exec(
|
|
|
query,
|
|
|
@@ -332,6 +341,9 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
|
|
|
integration.NotionPageID,
|
|
|
integration.ReadwiseEnabled,
|
|
|
integration.ReadwiseAPIKey,
|
|
|
+ integration.AppriseEnabled,
|
|
|
+ integration.AppriseURL,
|
|
|
+ integration.AppriseServicesURL,
|
|
|
integration.UserID,
|
|
|
)
|
|
|
|
|
|
@@ -352,7 +364,7 @@ func (s *Storage) HasSaveEntry(userID int64) (result bool) {
|
|
|
WHERE
|
|
|
user_id=$1
|
|
|
AND
|
|
|
- (pinboard_enabled='t' OR instapaper_enabled='t' OR wallabag_enabled='t' OR notion_enabled='t' OR nunux_keeper_enabled='t' OR espial_enabled='t' OR readwise_enabled='t' OR pocket_enabled='t' OR linkding_enabled='t')
|
|
|
+ (pinboard_enabled='t' OR instapaper_enabled='t' OR wallabag_enabled='t' OR notion_enabled='t' OR nunux_keeper_enabled='t' OR espial_enabled='t' OR readwise_enabled='t' OR pocket_enabled='t' OR linkding_enabled='t' OR apprise_enabled='t')
|
|
|
`
|
|
|
if err := s.db.QueryRow(query, userID).Scan(&result); err != nil {
|
|
|
result = false
|