mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
feat(integration): add Discord integration
This commit is contained in:
parent
f116f7dd6a
commit
9b25ea4ed6
26 changed files with 209 additions and 4 deletions
|
@ -209,7 +209,9 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
|
|||
ntfy_password,
|
||||
ntfy_icon_url,
|
||||
cubox_enabled,
|
||||
cubox_api_link
|
||||
cubox_api_link,
|
||||
discord_enabled,
|
||||
discord_webhook_link
|
||||
FROM
|
||||
integrations
|
||||
WHERE
|
||||
|
@ -318,6 +320,8 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
|
|||
&integration.NtfyIconURL,
|
||||
&integration.CuboxEnabled,
|
||||
&integration.CuboxAPILink,
|
||||
&integration.DiscordEnabled,
|
||||
&integration.DiscordWebhookLink,
|
||||
)
|
||||
switch {
|
||||
case err == sql.ErrNoRows:
|
||||
|
@ -434,9 +438,11 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
|
|||
ntfy_password=$97,
|
||||
ntfy_icon_url=$98,
|
||||
cubox_enabled=$99,
|
||||
cubox_api_link=$100
|
||||
cubox_api_link=$100,
|
||||
discord_enabled=$101,
|
||||
discord_webhook_link=$102
|
||||
WHERE
|
||||
user_id=$101
|
||||
user_id=$103
|
||||
`
|
||||
_, err := s.db.Exec(
|
||||
query,
|
||||
|
@ -540,6 +546,8 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
|
|||
integration.NtfyIconURL,
|
||||
integration.CuboxEnabled,
|
||||
integration.CuboxAPILink,
|
||||
integration.DiscordEnabled,
|
||||
integration.DiscordWebhookLink,
|
||||
integration.UserID,
|
||||
)
|
||||
|
||||
|
@ -580,7 +588,8 @@ func (s *Storage) HasSaveEntry(userID int64) (result bool) {
|
|||
omnivore_enabled='t' OR
|
||||
raindrop_enabled='t' OR
|
||||
betula_enabled='t' OR
|
||||
cubox_enabled='t'
|
||||
cubox_enabled='t' OR
|
||||
discord_enabled='t'
|
||||
)
|
||||
`
|
||||
if err := s.db.QueryRow(query, userID).Scan(&result); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue