Code Duplication    Length = 7-9 lines in 2 locations

controller/ownnotev2apicontroller.php 2 locations

@@ 65-71 (lines=7) @@
62
	 * @NoCSRFRequired
63
	 * @TODO Add etag / lastmodified
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
	/**
@@ 115-123 (lines=9) @@
112
	 * @NoAdminRequired
113
	 * @NoCSRFRequired
114
	 */
115
	public function delete($id) {
116
		$entity = $this->noteService->find($id);
117
		if (!$entity) {
118
			return new NotFoundJSONResponse();
119
		}
120
121
		$results = $this->noteService->delete($id);
122
		return new JSONResponse($results);
123
	}
124
125
}
126