/**
  * @param string $theme
  * @param string $template
  * @return JSONResponse
  */
 public function reset($theme, $template)
 {
     try {
         $template = new MailTemplate($theme, $template);
         $template->reset();
         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 resetTemplate($theme, $template)
 {
     try {
         $template = new MailTemplate($theme, $template);
         if ($template->reset()) {
             return new JSONResponse();
         } else {
             return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
         }
     } catch (\Exception $ex) {
         return new JSONResponse(array('message' => $ex->getMessage()), $ex->getCode());
     }
 }