getResponse(); } catch (\Exception $ex) { return new JSONResponse(array('message' => $ex->getMessage()), $ex->getCode()); } } /** * @param string $theme * @param string $template * @param string $content * @return JSONResponse */ public function update( $theme, $template, $content ) { try { $template = new \OCA\Files_Sharing\MailTemplate( $theme, $template ); $template->setContent( $content ); return new JSONResponse(); } catch (\Exception $ex) { return new JSONResponse(array('message' => $ex->getMessage()), $ex->getCode()); } } /** * @param string $theme * @param string $template * @return JSONResponse */ public function reset( $theme, $template ) { try { $template = new \OCA\Files_Sharing\MailTemplate( $theme, $template ); $template->reset(); return new JSONResponse(); } catch (\Exception $ex) { return new JSONResponse(array('message' => $ex->getMessage()), $ex->getCode()); } } }