From 422d108655c2a3f0f76b37118d372398636f81a2 Mon Sep 17 00:00:00 2001
From: Fabian Eichhorner <fabian.eichhorner@gmail.com>
Date: Wed, 28 Nov 2018 22:49:10 +0100
Subject: [PATCH] don't call the converter two times

---
 service-reporting/Controllers/PdfController.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/service-reporting/Controllers/PdfController.cs b/service-reporting/Controllers/PdfController.cs
index 3a132ee..726b897 100644
--- a/service-reporting/Controllers/PdfController.cs
+++ b/service-reporting/Controllers/PdfController.cs
@@ -96,7 +96,7 @@ namespace PdfService.Controllers
             
             var file = _converter.Convert(pdf);
             if(Request.Headers["Accept"] == "application/base64")
-                return Content(Convert.ToBase64String(_converter.Convert(pdf)));
+                return Content(Convert.ToBase64String(file));
             else
                 return File(file, "application/pdf");
         }
-- 
2.43.0