api: Added add_service_for_host endpoint to API (#8113)

* Add add_service_for_host endpoint to API

Signed-off-by: Rémy Jacquin <remy@remyj.fr>

* Change permissions to allow users to modify device

Signed-off-by: Rémy Jacquin <remy@remyj.fr>
This commit is contained in:
Rémy Jacquin
2018-01-21 20:56:57 +01:00
committed by Neil Lathwood
parent 8a9fc7783d
commit e12e6720f8
6 changed files with 99 additions and 7 deletions

View File

@@ -194,6 +194,7 @@ $app->group(
'/services',
function () use ($app) {
$app->get('/:hostname', 'authToken', 'list_services')->name('get_service_for_host');
$app->post('/:hostname', 'authToken', 'add_service_for_host')->name('add_service_for_host');
}
);
$app->get('/services', 'authToken', 'list_services')->name('list_services');