Having the clear locations endpoint only clear world locations, and adding endpoint to remove all items

This commit is contained in:
hz
2025-08-21 00:28:45 -05:00
parent 1e4b8463ee
commit b7c221d765
7 changed files with 194 additions and 1 deletions
+17
View File
@@ -2,6 +2,7 @@ using GameAuthApi.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using GameAuthApi.Models;
namespace GameAuthApi.Controllers;
@@ -23,5 +24,21 @@ public class AdminController : ControllerBase
var status = await _adminService.GetStatusAsync();
return Ok(status);
}
[HttpPost("reset-locations")]
[Authorize(Roles = "SUPER")]
public async Task<IActionResult> ResetLocations()
{
var origin = await _adminService.ResetLocationsAsync();
return Ok(origin);
}
[HttpPost("clear-items")]
[Authorize(Roles = "SUPER")]
public async Task<IActionResult> ClearItems()
{
await _adminService.ClearItemsAsync();
return Ok("All items cleared.");
}
}