nettoyer le contrôle html de la facture

This commit is contained in:
2017-07-06 13:00:06 +02:00
parent 44c0faaa29
commit c82a88f6a9
4 changed files with 18 additions and 11 deletions

View File

@ -64,11 +64,9 @@ namespace Yavsc.ApiControllers
return new ChallengeResult();
}
var filename = $"facture-{billingCode}-{id}.pdf";
FileInfo fi = new FileInfo(Path.Combine(Startup.UserBillsDirName, filename));
var fi = BillingHelpers.GetBillInfo(billingCode,id);
if (!fi.Exists) return Ok(new { Error = "Not generated" });
return File(fi.OpenRead(), "application/x-pdf", filename); ;
return File(fi.OpenRead(), "application/x-pdf", fi.Name);
}
[HttpGet("facture-{billingCode}-{id}.tex"), Authorize]