Add checks for resource strings (#930)

* Add checks for resource strings

* Don't use resource regex against png files
This commit is contained in:
Josh 2023-10-24 17:14:52 -05:00 committed by GitHub
parent 153bd75e26
commit 58664a2c7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 53 additions and 10 deletions

View file

@ -8,7 +8,6 @@ using LBPUnion.ProjectLighthouse.Types.Moderation.Cases;
using LBPUnion.ProjectLighthouse.Types.Users;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using IOFile = System.IO.File;
namespace LBPUnion.ProjectLighthouse.Servers.Website.Controllers.Admin;
@ -68,7 +67,7 @@ public class AdminUserController : ControllerBase
// And finally, attempt to remove the resource from the filesystem. We don't want that taking up space.
try
{
IOFile.Delete(FileHelper.GetResourcePath(hash));
FileHelper.DeleteResource(hash);
Logger.Success($"Deleted planet resource {hash}",
LogArea.Admin);
}