From c245055f6b1915e272a31f425f25c90833d24ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Rodr=C3=ADguez?= Date: Sun, 22 Nov 2020 17:20:25 +0100 Subject: [PATCH] Upload Video --- src/AppBundle/Controller/UserController.php | 2 +- src/AppBundle/Controller/VideoController.php | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/AppBundle/Controller/UserController.php b/src/AppBundle/Controller/UserController.php index 76164d2..3925f06 100644 --- a/src/AppBundle/Controller/UserController.php +++ b/src/AppBundle/Controller/UserController.php @@ -151,7 +151,7 @@ public function editAction(Request $request){ && $name != null && $surname != null){ - $user->setCreateAt($createAt); + $user->setCreatedAt($createAt); $user->setRole($role); $user->setEmail($email); $user->setName($name); diff --git a/src/AppBundle/Controller/VideoController.php b/src/AppBundle/Controller/VideoController.php index 075cbaf..e4e2946 100644 --- a/src/AppBundle/Controller/VideoController.php +++ b/src/AppBundle/Controller/VideoController.php @@ -171,8 +171,10 @@ public function editAction(Request $request, $id = null){ return $helpers->json($data); } - /* - * + /** + * @param Request $request + * @param null $id + * @return mixed */ public function uploadAction(Request $request, $id = null){ @@ -180,7 +182,7 @@ public function uploadAction(Request $request, $id = null){ $hash = $request->get('authorization', null); $authCheck = $helpers->authCheck($hash); - if($authCheck) { + if($authCheck){ $em = $this->getDoctrine()->getManager(); $identity = $helpers->authCheck($hash, true); @@ -207,7 +209,8 @@ public function uploadAction(Request $request, $id = null){ $data = [ 'status' => "success", 'code' => 200, - 'msg' => "Video image uploaded" + 'msg' => "Video image uploaded", + 'file_name' => $file_name ]; }else{