Merge and add BTCPay external nodes configuration
This commit is contained in:
@@ -28,6 +28,7 @@ public class AccountController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Login(string username, string password)
|
||||
{
|
||||
Console.WriteLine($"Received Username: '{username}', Password: '{password}'");
|
||||
@@ -68,6 +69,7 @@ public class AccountController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
[Authorize]
|
||||
public async Task<IActionResult> Logout()
|
||||
{
|
||||
|
||||
@@ -28,6 +28,7 @@ public class CategoriesController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(CreateCategoryDto model)
|
||||
{
|
||||
Console.WriteLine($"Received Category: Name='{model?.Name}', Description='{model?.Description}'");
|
||||
@@ -66,6 +67,7 @@ public class CategoriesController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(Guid id, UpdateCategoryDto model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
@@ -84,6 +86,7 @@ public class CategoriesController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Delete(Guid id)
|
||||
{
|
||||
await _categoryService.DeleteCategoryAsync(id);
|
||||
|
||||
@@ -72,6 +72,7 @@ public class MessagesController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Reply(Guid customerId, string content, bool isUrgent = false)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -78,6 +78,7 @@ public class OrdersController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(CreateOrderDto model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
@@ -101,6 +102,7 @@ public class OrdersController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(Guid id, OrderDto model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
@@ -125,6 +127,7 @@ public class OrdersController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> UpdateStatus(Guid id, UpdateOrderStatusDto model)
|
||||
{
|
||||
var success = await _orderService.UpdateOrderStatusAsync(id, model);
|
||||
@@ -138,6 +141,7 @@ public class OrdersController : Controller
|
||||
|
||||
// Workflow action methods
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> AcceptOrder(Guid id, string? notes)
|
||||
{
|
||||
var userName = User.Identity?.Name ?? "Unknown";
|
||||
@@ -157,6 +161,7 @@ public class OrdersController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> StartPacking(Guid id, string? notes)
|
||||
{
|
||||
var userName = User.Identity?.Name ?? "Unknown";
|
||||
@@ -176,6 +181,7 @@ public class OrdersController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DispatchOrder(Guid id, string trackingNumber, int estimatedDays = 3, string? notes = null)
|
||||
{
|
||||
var userName = User.Identity?.Name ?? "Unknown";
|
||||
@@ -200,6 +206,7 @@ public class OrdersController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> PutOnHold(Guid id, string reason, string? notes)
|
||||
{
|
||||
var userName = User.Identity?.Name ?? "Unknown";
|
||||
@@ -219,6 +226,7 @@ public class OrdersController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> RemoveFromHold(Guid id)
|
||||
{
|
||||
var userName = User.Identity?.Name ?? "Unknown";
|
||||
@@ -237,6 +245,7 @@ public class OrdersController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> MarkDelivered(Guid id, DateTime? actualDeliveryDate, string? notes)
|
||||
{
|
||||
var deliveredDto = new MarkDeliveredDto
|
||||
|
||||
@@ -40,6 +40,7 @@ public class ProductsController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(CreateProductDto model)
|
||||
{
|
||||
Console.WriteLine($"Received Product: Name='{model?.Name}', Description='{model?.Description}', Price={model?.Price}, Stock={model?.StockQuantity}");
|
||||
@@ -99,6 +100,7 @@ public class ProductsController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(Guid id, UpdateProductDto model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
@@ -119,6 +121,7 @@ public class ProductsController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> UploadPhoto(Guid id, IFormFile file, string? altText)
|
||||
{
|
||||
if (file != null && file.Length > 0)
|
||||
@@ -130,6 +133,7 @@ public class ProductsController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeletePhoto(Guid id, Guid photoId)
|
||||
{
|
||||
await _productService.RemoveProductPhotoAsync(id, photoId);
|
||||
@@ -137,6 +141,7 @@ public class ProductsController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Delete(Guid id)
|
||||
{
|
||||
await _productService.DeleteProductAsync(id);
|
||||
@@ -176,6 +181,7 @@ public class ProductsController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> CreateVariation(CreateProductVariationDto model)
|
||||
{
|
||||
// Debug form data
|
||||
@@ -261,6 +267,7 @@ public class ProductsController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> EditVariation(Guid id, UpdateProductVariationDto model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
@@ -280,6 +287,7 @@ public class ProductsController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteVariation(Guid id)
|
||||
{
|
||||
var variation = await _productService.GetProductVariationByIdAsync(id);
|
||||
@@ -297,6 +305,7 @@ public class ProductsController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Import(IFormFile file)
|
||||
{
|
||||
if (file == null || file.Length == 0)
|
||||
|
||||
@@ -30,6 +30,7 @@ public class ShippingRatesController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(CreateShippingRateDto model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
@@ -69,6 +70,7 @@ public class ShippingRatesController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(Guid id, UpdateShippingRateDto model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
@@ -88,6 +90,7 @@ public class ShippingRatesController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Delete(Guid id)
|
||||
{
|
||||
var success = await _shippingRateService.DeleteShippingRateAsync(id);
|
||||
|
||||
@@ -28,6 +28,7 @@ public class UsersController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(CreateUserDto model)
|
||||
{
|
||||
try
|
||||
@@ -73,6 +74,7 @@ public class UsersController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(Guid id, UpdateUserDto model)
|
||||
{
|
||||
try
|
||||
@@ -122,6 +124,7 @@ public class UsersController : Controller
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Delete(Guid id)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user