| @@ 65-71 (lines=7) @@ | ||
| 62 | * @NoAdminRequired  | 
                                |
| 63 | * @NoCSRFRequired  | 
                                |
| 64 | */  | 
                                |
| 65 | 	public function get($id) { | 
                                |
| 66 | $results = $this->noteService->find($id);  | 
                                |
| 67 | 		if(!$results){ | 
                                |
| 68 | return new NotFoundJSONResponse();  | 
                                |
| 69 | }  | 
                                |
| 70 | return new JSONResponse($results);  | 
                                |
| 71 | }  | 
                                |
| 72 | ||
| 73 | ||
| 74 | /**  | 
                                |
| @@ 114-122 (lines=9) @@ | ||
| 111 | * @NoAdminRequired  | 
                                |
| 112 | * @NoCSRFRequired  | 
                                |
| 113 | */  | 
                                |
| 114 | 	public function delete($id) { | 
                                |
| 115 | $entity = $this->noteService->find($id);  | 
                                |
| 116 | 		if(!$entity){ | 
                                |
| 117 | return new NotFoundJSONResponse();  | 
                                |
| 118 | }  | 
                                |
| 119 | ||
| 120 | 		$results = $this->noteService->delete('', $id); //@TODO add folder | 
                                |
| 121 | return new JSONResponse($results);  | 
                                |
| 122 | }  | 
                                |
| 123 | ||
| 124 | }  | 
                                |
| 125 | ||