Added the get API in Expenses module
This commit is contained in:
parent
15f100308f
commit
84f5da25f6
@ -42,9 +42,18 @@ namespace Marco.Pms.Services.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<string> Get()
|
public async Task<IActionResult> Get()
|
||||||
{
|
{
|
||||||
return new string[] { "value1", "value2" };
|
var expensesList = await _context.Expenses
|
||||||
|
.Include(e => e.ExpensesType)
|
||||||
|
.Include(e => e.Project)
|
||||||
|
.Include(e => e.PaidBy)
|
||||||
|
.Include(e => e.PaymentMode)
|
||||||
|
.Include(e => e.Status)
|
||||||
|
.Include(e => e.CreatedBy)
|
||||||
|
.Where(e => e.TenantId == tenantId)
|
||||||
|
.ToListAsync();
|
||||||
|
return StatusCode(200, ApiResponse<object>.SuccessResponse(expensesList));
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user