From 813849e5216cb87121e0f778a734575be6a36052 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 7 May 2017 16:50:20 +0200 Subject: Add history entries for API endpoint CHANGED: datetime is now store as an object in history store file --- application/api/controllers/History.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/api/controllers/History.php') diff --git a/application/api/controllers/History.php b/application/api/controllers/History.php index c4ff3e5d..da034eb2 100644 --- a/application/api/controllers/History.php +++ b/application/api/controllers/History.php @@ -28,7 +28,7 @@ class History extends ApiController */ public function getHistory($request, $response) { - $history = (new \History($this->conf->get('resource.history')))->getHistory(); + $history = $this->history->getHistory(); $history = array_reverse($history); // Return history operations from the {offset}th, starting from {since}. -- cgit v1.2.3 From 6bc90f50af611a1674ee1118587feddd4f625d44 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 7 May 2017 16:56:20 +0200 Subject: History: fix entries order --- application/api/controllers/History.php | 1 - 1 file changed, 1 deletion(-) (limited to 'application/api/controllers/History.php') diff --git a/application/api/controllers/History.php b/application/api/controllers/History.php index da034eb2..2ff9deaf 100644 --- a/application/api/controllers/History.php +++ b/application/api/controllers/History.php @@ -29,7 +29,6 @@ class History extends ApiController public function getHistory($request, $response) { $history = $this->history->getHistory(); - $history = array_reverse($history); // Return history operations from the {offset}th, starting from {since}. $since = \DateTime::createFromFormat(\DateTime::ATOM, $request->getParam('since')); -- cgit v1.2.3