Beispiel #1
0
 /**
  * @param Request $request
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function updateImage(Request $request)
 {
     $return['ok'] = 0;
     $id = $request->input('tagId');
     $parentId = $request->input('parentId');
     $typeId = $request->input('typeId');
     $imageName = $request->input('name');
     try {
         $tagService = new tagService();
         $return['data'] = $tagService->updateImage($id, $parentId, $typeId, $imageName);
         $return['ok'] = 1;
     } catch (\Exception $e) {
         // @codeCoverageIgnoreStart
         $return['error'] = $e->getMessage();
         $return['errorMsg'] = $e->getMessage();
         // @codeCoverageIgnoreEnd
     }
     return response()->json($return);
 }
Beispiel #2
0
 public function updateImage(Request $request)
 {
     $return['ok'] = 0;
     $id = $request->input('tagId');
     $imageName = $request->input('name');
     try {
         $tagService = new tagService();
         $return['data'] = $tagService->updateImage($id, $imageName);
         $return['ok'] = 1;
     } catch (Exception $e) {
         // @codeCoverageIgnoreStart
         $return['error'] = TR::l('EDITOR/MESSAGE/ERROR/SHARE_BIN');
         $return['errorMsg'] = $e->getMessage();
         Binumi_Util::logErr($e->getMessage());
         // @codeCoverageIgnoreEnd
     }
     return response()->json($return);
 }