catch ajax content with getContent
This commit is contained in:
parent
0d750d6b7c
commit
cada22694d
@ -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,
|
||||
] );
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user