Added an API endpoint to search for objects by name (closes #337)

This commit is contained in:
Bernd Bestel
2019-08-10 13:07:08 +02:00
parent e6020432c6
commit fa326fdfda
4 changed files with 96 additions and 0 deletions

View File

@@ -124,6 +124,7 @@ $app->group('/api', function()
// Generic entity interaction
$this->get('/objects/{entity}', '\Grocy\Controllers\GenericEntityApiController:GetObjects');
$this->get('/objects/{entity}/{objectId}', '\Grocy\Controllers\GenericEntityApiController:GetObject');
$this->get('/objects/{entity}/search/{searchString}', '\Grocy\Controllers\GenericEntityApiController:SearchObjects');
$this->post('/objects/{entity}', '\Grocy\Controllers\GenericEntityApiController:AddObject');
$this->put('/objects/{entity}/{objectId}', '\Grocy\Controllers\GenericEntityApiController:EditObject');
$this->delete('/objects/{entity}/{objectId}', '\Grocy\Controllers\GenericEntityApiController:DeleteObject');