moved data to public dir

This commit is contained in:
Timerix 2025-05-23 01:24:22 +05:00
parent 9415c60287
commit 36d39b524c
2 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,8 @@ namespace ParadoxSaveParser.WebAPI;
public static class PathHelper
{
public static readonly IOPath DATA_DIR = "data";
public static readonly IOPath PUBLIC_DIR = "public";
public static readonly IOPath DATA_DIR = Path.Concat(PUBLIC_DIR, "data");
public static readonly IOPath SAVES_DIR = Path.Concat(DATA_DIR, "saves");
public static readonly IOPath PARSED_DIR = Path.Concat(DATA_DIR, "parsed");
public static readonly IOPath TEMP_DIR = "temp";

View File

@ -97,7 +97,7 @@ public static class Program
// http server
var router = new SimpleRouter(loggerRoot);
router.DefaultRoute = new SimpleRouter.RouteWithMethod(HttpMethod.GET,
new ServeFilesRouteHandler("public"));
new ServeFilesRouteHandler(PathHelper.PUBLIC_DIR));
router.MapRoute("/uploadSave", HttpMethod.POST,
new UploadSaveHandler(mainCancel.Token, bgJobManager, saveFilters));
router.MapRoute("/getSaveStatus", HttpMethod.GET,