diff options
author | Frédéric Guillot <fred@miniflux.net> | 2018-05-21 12:19:56 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-05-21 19:58:36 -0400 |
commit | b270159aae97359afe02f3c4843fa0f4e9a1a1b6 (patch) | |
tree | 290eef118ce6ccab49471d3673bb7d51b24bb4c2 /ui/integration_pocket.go | |
parent | 44decae557a6f78eda57b8f407d35b10233538e4 (diff) |
Offer the possibility to set Pocket Consumer Key as environment variable
Diffstat (limited to 'ui/integration_pocket.go')
-rw-r--r-- | ui/integration_pocket.go | 4 |
1 files changed, 2 insertions, 2 deletions
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) |