aboutsummaryrefslogtreecommitdiffhomepage
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/entry_save.go2
-rw-r--r--ui/integration_pocket.go4
-rw-r--r--ui/integration_show.go1
3 files changed, 4 insertions, 3 deletions
diff --git a/ui/entry_save.go b/ui/entry_save.go
index 9b24078..12ebf2a 100644
--- a/ui/entry_save.go
+++ b/ui/entry_save.go
@@ -47,7 +47,7 @@ func (c *Controller) SaveEntry(w http.ResponseWriter, r *http.Request) {
}
go func() {
- integration.SendEntry(entry, settings)
+ integration.SendEntry(c.cfg, entry, settings)
}()
json.Created(w, map[string]string{"message": "saved"})
diff --git a/ui/integration_pocket.go b/ui/integration_pocket.go
index 4f65d61..02497c7 100644
--- a/ui/integration_pocket.go
+++ b/ui/integration_pocket.go
@@ -33,7 +33,7 @@ func (c *Controller) PocketAuthorize(w http.ResponseWriter, r *http.Request) {
}
sess := session.New(c.store, ctx)
- connector := pocket.NewConnector(integration.PocketConsumerKey)
+ connector := pocket.NewConnector(c.cfg.PocketConsumerKey(integration.PocketConsumerKey))
redirectURL := c.cfg.BaseURL() + route.Path(c.router, "pocketCallback")
requestToken, err := connector.RequestToken(redirectURL)
if err != nil {
@@ -64,7 +64,7 @@ func (c *Controller) PocketCallback(w http.ResponseWriter, r *http.Request) {
return
}
- connector := pocket.NewConnector(integration.PocketConsumerKey)
+ connector := pocket.NewConnector(c.cfg.PocketConsumerKey(integration.PocketConsumerKey))
accessToken, err := connector.AccessToken(ctx.PocketRequestToken())
if err != nil {
logger.Error("[Pocket:Callback] %v", err)
diff --git a/ui/integration_show.go b/ui/integration_show.go
index d368d85..31d374f 100644
--- a/ui/integration_show.go
+++ b/ui/integration_show.go
@@ -61,6 +61,7 @@ func (c *Controller) ShowIntegrations(w http.ResponseWriter, r *http.Request) {
view.Set("menu", "settings")
view.Set("user", user)
view.Set("countUnread", c.store.CountUnreadEntries(user.ID))
+ view.Set("hasPocketConsumerKeyConfigured", c.cfg.PocketConsumerKey("") != "")
html.OK(w, view.Render("integrations"))
}