Ready for prod.

This commit is contained in:
2026-04-09 18:14:09 +02:00
parent 0ae685753f
commit f933065275
13 changed files with 84 additions and 19 deletions

View File

@@ -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() ] );
}