C'est un pAPI.
This commit is contained in:
@@ -55,10 +55,10 @@ public class InvoiceController : Controller {
|
||||
roles = new List<string>();
|
||||
}
|
||||
|
||||
try { // TODO: Débugger ça.
|
||||
try {
|
||||
id = _signInMan.Context.User.Identity.GetUserId();
|
||||
if (all is not null && all == true && roles.Contains("Administrateur"))
|
||||
return Ok(_context.Invoices/*.Include("LinkedAccount").Include("ShippingAddress"/*"LinkedAccount, ShippingAddress")*/.ToList());
|
||||
return Ok(_context.Invoices.ToList());
|
||||
else return Ok(_context.Invoices.Include("ShippingAddress").Where(x => x.LinkedAccount != null &&
|
||||
x.LinkedAccount.Id == id).ToList());
|
||||
} catch (Exception e) {
|
||||
|
Reference in New Issue
Block a user