equal
deleted
inserted
replaced
65 * @param string $id |
65 * @param string $id |
66 * @return Response |
66 * @return Response |
67 */ |
67 */ |
68 public function show(Request $request, $id) |
68 public function show(Request $request, $id) |
69 { |
69 { |
|
70 $id= urldecode($id); |
70 $short = filter_var($request->input('short', false), FILTER_VALIDATE_BOOLEAN); |
71 $short = filter_var($request->input('short', false), FILTER_VALIDATE_BOOLEAN); |
71 $doc = $this->documentRepository->get($id, $short); |
72 $doc = $this->documentRepository->get($id, $short); |
72 if(is_null($doc)) { |
73 if(is_null($doc)) { |
73 abort(404); |
74 abort(404); |
74 } |
75 } |
81 * |
82 * |
82 * @param string $id |
83 * @param string $id |
83 * @return Response |
84 * @return Response |
84 */ |
85 */ |
85 public function transcript($id) { |
86 public function transcript($id) { |
|
87 $id= urldecode($id); |
|
88 |
86 $doc = $this->documentRepository->get($id); |
89 $doc = $this->documentRepository->get($id); |
87 if(is_null($doc) || is_null($doc->getTranscript()) ) { |
90 if(is_null($doc) || is_null($doc->getTranscript()) ) { |
88 abort(404); |
91 abort(404); |
89 } |
92 } |
90 $transcript = $doc->getTranscript(); |
93 $transcript = $doc->getTranscript(); |
115 * @param int $id |
118 * @param int $id |
116 * @return Response |
119 * @return Response |
117 */ |
120 */ |
118 public function update(Request $request, $id) |
121 public function update(Request $request, $id) |
119 { |
122 { |
|
123 $id= urldecode($id); |
|
124 |
120 $data = $request->json(); |
125 $data = $request->json(); |
121 $document = $data->get('document'); |
126 $document = $data->get('document'); |
122 $doc = $this->documentRepository->get($id); |
127 $doc = $this->documentRepository->get($id); |
123 if(is_null($doc)) { |
128 if(is_null($doc)) { |
124 abort(404); |
129 abort(404); |