refacto API prefix + nav.back

This commit is contained in:
Paul Schneider 2026-08-20 20:50:52 +01:00
commit ec901e1f10
78 changed files with 770 additions and 222 deletions

View file

@ -9,7 +9,7 @@ using Yavsc.Server.Helpers;
namespace Yavsc.Controllers
{
[Produces("application/json")]
[Route("api/ProductApi")]
[Route(Constants.APIPrefix + "/ProductApi")]
public class ProductApiController : Controller
{
private readonly ApplicationDbContext _context;
@ -46,7 +46,7 @@ namespace Yavsc.Controllers
}
// PUT: api/ProductApi/5
[HttpPut("{id}"),Authorize(YavscConstants.FrontOfficeGroupName)]
[HttpPut("{id}"),Authorize(Constants.FrontOfficeGroupName)]
public IActionResult PutProduct(long id, [FromBody] Product product)
{
if (!ModelState.IsValid)
@ -81,7 +81,7 @@ namespace Yavsc.Controllers
}
// POST: api/ProductApi
[HttpPost,Authorize(YavscConstants.FrontOfficeGroupName)]
[HttpPost,Authorize(Constants.FrontOfficeGroupName)]
public IActionResult PostProduct([FromBody] Product product)
{
if (!ModelState.IsValid)
@ -110,7 +110,7 @@ namespace Yavsc.Controllers
}
// DELETE: api/ProductApi/5
[HttpDelete("{id}"),Authorize(YavscConstants.FrontOfficeGroupName)]
[HttpDelete("{id}"),Authorize(Constants.FrontOfficeGroupName)]
public IActionResult DeleteProduct(long id)
{
if (!ModelState.IsValid)