restructure seed

This commit is contained in:
Aaron Po
2026-01-13 20:10:39 -05:00
parent 7fbdfbf542
commit b5ab6f6893
40 changed files with 1002 additions and 873 deletions

View File

@@ -4,10 +4,10 @@ namespace WebAPI.Controllers
{
[ApiController]
[ApiExplorerSettings(IgnoreApi = true)]
[Route("error")] // ← required
[Route("error")] // ← required
public class NotFoundController : ControllerBase
{
[HttpGet("404")] // ← required
[HttpGet("404")] // ← required
public IActionResult Handle404()
{
return NotFound(new { message = "Route not found." });

View File

@@ -1,5 +1,5 @@
using DataAccessLayer.Entities;
using BusinessLayer.Services;
using DataAccessLayer.Entities;
using Microsoft.AspNetCore.Mvc;
namespace WebAPI.Controllers
@@ -79,9 +79,15 @@ namespace WebAPI.Controllers
}
[HttpPut("{id:guid}")]
public IActionResult UpdateUser(Guid id, [FromBody] UserAccount userAccount)
public IActionResult UpdateUser(
Guid id,
[FromBody] UserAccount userAccount
)
{
if (userAccount.UserAccountID != Guid.Empty && userAccount.UserAccountID != id)
if (
userAccount.UserAccountID != Guid.Empty
&& userAccount.UserAccountID != id
)
{
return BadRequest("UserAccountID does not match route id.");
}