/** * @NoAdminRequired * @CORS * @NoCSRFRequired * * @param string $content * @return DataResponse */ public function create($content) { return $this->respond(function () use($content) { $note = $this->service->create($this->userId); return $this->service->update($note->getId(), $content, $this->userId); }); }
/** * @NoAdminRequired * * @param string $content */ public function create($content) { $note = $this->notesService->create($this->userId); $note = $this->notesService->update($note->getId(), $content, $this->userId); return new DataResponse($note); }