diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-05-07 17:40:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-07 17:40:17 +0200 |
commit | b4189928f84758e1589715dfe04e2d966a4f3b88 (patch) | |
tree | f17b8fa91fe8244fed7a913d64ce3220551916ff /application/api/controllers/History.php | |
parent | a4af59f47103a3f9c903eeddb1e30ab9cb7344f0 (diff) | |
parent | b86aeccf6a99a9617c66cded7252a33b1df560cd (diff) | |
download | Shaarli-b4189928f84758e1589715dfe04e2d966a4f3b88.tar.gz Shaarli-b4189928f84758e1589715dfe04e2d966a4f3b88.tar.zst Shaarli-b4189928f84758e1589715dfe04e2d966a4f3b88.zip |
Merge pull request #858 from ArthurHoaro/api/history-entries
Add history entries for API endpoint
Diffstat (limited to 'application/api/controllers/History.php')
-rw-r--r-- | application/api/controllers/History.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/application/api/controllers/History.php b/application/api/controllers/History.php index c4ff3e5d..2ff9deaf 100644 --- a/application/api/controllers/History.php +++ b/application/api/controllers/History.php | |||
@@ -28,8 +28,7 @@ class History extends ApiController | |||
28 | */ | 28 | */ |
29 | public function getHistory($request, $response) | 29 | public function getHistory($request, $response) |
30 | { | 30 | { |
31 | $history = (new \History($this->conf->get('resource.history')))->getHistory(); | 31 | $history = $this->history->getHistory(); |
32 | $history = array_reverse($history); | ||
33 | 32 | ||
34 | // Return history operations from the {offset}th, starting from {since}. | 33 | // Return history operations from the {offset}th, starting from {since}. |
35 | $since = \DateTime::createFromFormat(\DateTime::ATOM, $request->getParam('since')); | 34 | $since = \DateTime::createFromFormat(\DateTime::ATOM, $request->getParam('since')); |