PI2024-23 #2
@ -119,9 +119,9 @@ namespace FirmTracker_Server.Controllers
|
|||||||
[HttpGet("{id}/transactions")]
|
[HttpGet("{id}/transactions")]
|
||||||
[ProducesResponseType(200)]
|
[ProducesResponseType(200)]
|
||||||
[ProducesResponseType(404)]
|
[ProducesResponseType(404)]
|
||||||
public IActionResult GetReportTransactions(int reportId)
|
public IActionResult GetReportTransactions(int id)
|
||||||
{
|
{
|
||||||
var transactions = _reportCRUD.GetReportTransactions(reportId);
|
var transactions = _reportCRUD.GetReportTransactions(id);
|
||||||
if (transactions == null)
|
if (transactions == null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
@ -132,9 +132,9 @@ namespace FirmTracker_Server.Controllers
|
|||||||
[HttpGet("{id}/expenses")]
|
[HttpGet("{id}/expenses")]
|
||||||
[ProducesResponseType(200)]
|
[ProducesResponseType(200)]
|
||||||
[ProducesResponseType(404)]
|
[ProducesResponseType(404)]
|
||||||
public IActionResult GetReportExpenses(int reportId)
|
public IActionResult GetReportExpenses(int id)
|
||||||
{
|
{
|
||||||
var expenses = _reportCRUD.GetReportExpenses(reportId);
|
var expenses = _reportCRUD.GetReportExpenses(id);
|
||||||
if (expenses == null)
|
if (expenses == null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
@ -159,11 +159,11 @@ namespace FirmTracker_Server.Controllers
|
|||||||
[ProducesResponseType(204)]
|
[ProducesResponseType(204)]
|
||||||
[ProducesResponseType(400)]
|
[ProducesResponseType(400)]
|
||||||
[ProducesResponseType(404)]
|
[ProducesResponseType(404)]
|
||||||
public IActionResult UpdateReport(int reportId, [FromBody] Report.DateRangeDto dateRange)
|
public IActionResult UpdateReport(int id, [FromBody] Report.DateRangeDto dateRange)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var report = _reportCRUD.GetReport(reportId);
|
var report = _reportCRUD.GetReport(id);
|
||||||
if (report == null)
|
if (report == null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
@ -227,11 +227,11 @@ namespace FirmTracker_Server.Controllers
|
|||||||
[HttpDelete]
|
[HttpDelete]
|
||||||
[ProducesResponseType(204)]
|
[ProducesResponseType(204)]
|
||||||
[ProducesResponseType(404)]
|
[ProducesResponseType(404)]
|
||||||
public IActionResult DeleteReport(int reportId)
|
public IActionResult DeleteReport(int id)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_reportCRUD.DeleteReport(reportId);
|
_reportCRUD.DeleteReport(id);
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
Loading…
Reference in New Issue
Block a user