aboutsummaryrefslogtreecommitdiffhomepage
path: root/integration/wallabag
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-04-29 17:58:09 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-04-29 17:58:09 -0700
commit7a1653a2e9e0802677d34f513828b33c0ef5c576 (patch)
treead1c8dfe22c362309be5f7e66fb0d76a62f01c56 /integration/wallabag
parent31da4db14fdda364b1c72460a81e3ccce67ff7e8 (diff)
Make sure integrations are configured before to make any HTTP requests
Diffstat (limited to 'integration/wallabag')
-rw-r--r--integration/wallabag/wallabag.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/integration/wallabag/wallabag.go b/integration/wallabag/wallabag.go
index 58d9c5b..02a36b5 100644
--- a/integration/wallabag/wallabag.go
+++ b/integration/wallabag/wallabag.go
@@ -24,6 +24,10 @@ type Client struct {
// AddEntry sends a link to Wallabag.
func (c *Client) AddEntry(link, title string) error {
+ if c.baseURL == "" || c.clientID == "" || c.clientSecret == "" || c.username == "" || c.password == "" {
+ return fmt.Errorf("wallabag: missing credentials")
+ }
+
accessToken, err := c.getAccessToken()
if err != nil {
return err