зеркало из https://github.com/nextcloud/cookbook.git
A recipe not found should result in a 404
This commit is contained in:
Родитель
d0111607a9
Коммит
3c3d4e60bb
|
@ -106,6 +106,9 @@ class RecipeController extends Controller {
|
|||
public function get($id) {
|
||||
$json = $this->service->getRecipeById($id);
|
||||
|
||||
if(null === $json){
|
||||
return new DataResponse($id, Http::STATUS_NOT_FOUND, [ 'Content-Type' => 'application/json' ] );
|
||||
}
|
||||
return new DataResponse($json, Http::STATUS_OK, [ 'Content-Type' => 'application/json' ]);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче