catch ajax content with getContent

This commit is contained in:
Kayn Ty 2018-04-06 17:38:14 +02:00
parent 0d750d6b7c
commit cada22694d

View File

@ -120,22 +120,21 @@ class DefaultController extends Controller {
public function addSellingAction( Request $request ) {
// var_dump( $request->request );
// die();
$json = json_decode( $request->getContent() );
// link selling record with user, festival
// setup dates
// persist all
// fetch back history of selling
echo "<pre>";
var_dump( $_POST );
// echo "<pre>";
// var_dump( $request->getContent() );
//
// echo "</pre>";
echo "</pre>";
return var_dump( $request->request );
// return new JsonResponse( [
// "message" => "ok",
// "recent_sellings" => [],
// "dump" => $request->request->get( 'sellingComment' ),
// "dump2" => $request->getMethod(),
// "dump3" => $request->request->get( 'data' ),
// ] );
// return var_dump( $request->getContent() );
return new JsonResponse( [
"message" => "ok",
"recent_sellings" => [],
"dump" => $json,
] );
}
}