From 665191e9cd7196d82a9885de2b77fc3ef4dbbd28 Mon Sep 17 00:00:00 2001 From: Ben Speakman Date: Tue, 13 Oct 2015 11:44:04 +0100 Subject: [PATCH] Move entire endpoint url into config. Fixes #3 --- src/Cyberduck/LaravelWpApi/WpApi.php | 2 +- src/config/config.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cyberduck/LaravelWpApi/WpApi.php b/src/Cyberduck/LaravelWpApi/WpApi.php index cca1585..ad1c239 100755 --- a/src/Cyberduck/LaravelWpApi/WpApi.php +++ b/src/Cyberduck/LaravelWpApi/WpApi.php @@ -80,7 +80,7 @@ class WpApi $query['auth'] = $this->auth; } - $response = $this->client->get($this->endpoint . '/wp-json/' . $method, $query); + $response = $this->client->get($this->endpoint . $method, $query); $return = [ 'results' => $response->json(), diff --git a/src/config/config.php b/src/config/config.php index d71cdca..ee41d48 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -2,6 +2,6 @@ return array( - 'endpoint' => '', + 'endpoint' => 'http:///wp-json/', );