Ready for prod.
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Domain\Controller;
|
||||
use App\Helpers\UploadFiles;
|
||||
use App\Http\JSONResponse;
|
||||
use App\Http\Request;
|
||||
use App\Kernel;
|
||||
|
||||
class IngredientsAPIController extends Controller {
|
||||
|
||||
@@ -39,7 +40,7 @@ class IngredientsAPIController extends Controller {
|
||||
if( !new IngredientRepository()->add( $ingredient ) )
|
||||
JSONResponse::sendError( [ 'error' => 'An error occured while adding ingredient' ] );
|
||||
|
||||
JSONResponse::sendSuccess( [ 'image_url' => $urlOrError ] );
|
||||
JSONResponse::sendSuccess( [ 'image_url' => $urlOrError, 'id' => Kernel::$DB->pdo->lastInsertId() ] );
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user