refactoring Pdf generation

This commit is contained in:
2016-11-30 11:01:22 +01:00
parent 1d69a7ea74
commit 0582421523
3 changed files with 102 additions and 80 deletions

View File

@ -79,13 +79,13 @@ namespace Yavsc.ApiControllers
public IActionResult GetTex(long id)
{
Response.ContentType = "text/x-tex";
return ViewComponent("Estimate",new object[] { id, false });
return ViewComponent("Estimate",new object[] { id, "LaTeX" });
}
[HttpPost("gen/{id}")]
public IActionResult GeneratePdf(long id)
{
return ViewComponent("Estimate",new object[] { id, true } );
return ViewComponent("Estimate",new object[] { id, "Pdf" } );
}
}
}