From a6daeb72de06fae337e2b187e5afef4157bf357d Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 20 Aug 2016 18:16:45 +0200 Subject: [PATCH] Correct issue with Restful API --- glances/outputs/glances_bottle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glances/outputs/glances_bottle.py b/glances/outputs/glances_bottle.py index 7fdcf8f9..da0c93c4 100644 --- a/glances/outputs/glances_bottle.py +++ b/glances/outputs/glances_bottle.py @@ -76,8 +76,6 @@ class GlancesBottle(object): self._app.route('/', method="GET", callback=self._index) self._app.route('/', method=["GET"], callback=self._index) - self._app.route('/', method="GET", callback=self._resource) - # REST API self._app.route('/api/2/args', method="GET", callback=self._api_args) self._app.route('/api/2/args/:item', method="GET", callback=self._api_args_item) @@ -96,6 +94,8 @@ class GlancesBottle(object): self._app.route('/api/2/:plugin/:item/history/:nb', method="GET", callback=self._api_item_history) self._app.route('/api/2/:plugin/:item/:value', method="GET", callback=self._api_value) + self._app.route('/', method="GET", callback=self._resource) + def start(self, stats): """Start the bottle.""" # Init stats