mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-10-07 16:19:07 +00:00
fix(security): remove request-controlled write guards
This commit is contained in:
parent
d3c4cdcf1c
commit
12b6bd859e
1 changed files with 0 additions and 6 deletions
|
|
@ -64,9 +64,6 @@ namespace Api.SeaHavenIndustries.Controllers
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IActionResult> Create([FromBody] CreateVendorRosterDTO model, CancellationToken cancellationToken)
|
public async Task<IActionResult> Create([FromBody] CreateVendorRosterDTO model, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
if (model == null)
|
|
||||||
return BadRequest(new Response { Status = "Error", Message = "Request body is required" });
|
|
||||||
|
|
||||||
var userId = User.FindFirstValue(ClaimTypes.NameIdentifier);
|
var userId = User.FindFirstValue(ClaimTypes.NameIdentifier);
|
||||||
if (userId == null)
|
if (userId == null)
|
||||||
return Unauthorized(new Response { Status = "Error", Message = "User not authenticated" });
|
return Unauthorized(new Response { Status = "Error", Message = "User not authenticated" });
|
||||||
|
|
@ -97,9 +94,6 @@ namespace Api.SeaHavenIndustries.Controllers
|
||||||
[FromBody] ReconcileVendorRosterDTO model,
|
[FromBody] ReconcileVendorRosterDTO model,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
if (model == null)
|
|
||||||
return BadRequest(new Response { Status = "Error", Message = "Request body is required" });
|
|
||||||
|
|
||||||
var userId = User.FindFirstValue(ClaimTypes.NameIdentifier);
|
var userId = User.FindFirstValue(ClaimTypes.NameIdentifier);
|
||||||
if (userId == null)
|
if (userId == null)
|
||||||
return Unauthorized(new Response { Status = "Error", Message = "User not authenticated" });
|
return Unauthorized(new Response { Status = "Error", Message = "User not authenticated" });
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue