Skip to content

Commit

Permalink
Remove create report endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
aeshub committed May 24, 2022
1 parent 01d0ad0 commit 3406ae8
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions backend/api/Controllers/ReportController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,4 @@ public async Task<ActionResult<Report>> GetReportById([FromRoute] string id)
return NotFound($"Could not find report with id {id}");
return Ok(report);
}

/// <summary>
/// Register a new report.
/// </summary>
[HttpPost]
[ProducesResponseType(typeof(Report), StatusCodes.Status201Created)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<ActionResult<Report>> PostReport([FromBody] Report report)
{
var newReport = await _reportService.Create(report);
return CreatedAtAction(nameof(GetReportById), new { id = newReport.Id }, newReport);
}
}

0 comments on commit 3406ae8

Please sign in to comment.