From 2a2db2b058f99aba1cd0801f51fb63ae26dd896b Mon Sep 17 00:00:00 2001 From: Yassine Date: Thu, 28 Mar 2019 22:19:19 +0100 Subject: [PATCH] remove base64 encoding check when saving template --- src/Http/Controllers/MailablesController.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Http/Controllers/MailablesController.php b/src/Http/Controllers/MailablesController.php index 8800eec..81f833d 100644 --- a/src/Http/Controllers/MailablesController.php +++ b/src/Http/Controllers/MailablesController.php @@ -86,7 +86,9 @@ public function parseTemplate(Request $request) $template = $request->has('template') ? $request->template : false; - if( mailEclipse::markdownedTemplateToView(true, $request->markdown, base64_decode($request->viewpath), $template) ){ + $viewPath = $request->has('template') ? $request->viewpath : base64_decode($request->viewpath); + + if( mailEclipse::markdownedTemplateToView(true, $request->markdown, $viewPath, $template) ){ return response()->json([ 'status' => 'ok', @@ -94,8 +96,8 @@ public function parseTemplate(Request $request) } return response()->json([ - 'status' => 'error', - ]); + 'status' => 'error', + ]); }