aboutsummaryrefslogtreecommitdiffhomepage
path: root/integration/nunuxkeeper
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/nunuxkeeper
parent31da4db14fdda364b1c72460a81e3ccce67ff7e8 (diff)
Make sure integrations are configured before to make any HTTP requests
Diffstat (limited to 'integration/nunuxkeeper')
-rw-r--r--integration/nunuxkeeper/nunuxkeeper.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/integration/nunuxkeeper/nunuxkeeper.go b/integration/nunuxkeeper/nunuxkeeper.go
index 4ea5c45..cb340ab 100644
--- a/integration/nunuxkeeper/nunuxkeeper.go
+++ b/integration/nunuxkeeper/nunuxkeeper.go
@@ -28,6 +28,10 @@ type Client struct {
// AddEntry sends an entry to Nunux Keeper.
func (c *Client) AddEntry(link, title, content string) error {
+ if c.baseURL == "" || c.apiKey == "" {
+ return fmt.Errorf("nunux-keeper: missing credentials")
+ }
+
doc := &Document{
Title: title,
Origin: link,