From 36d39b524c033ea2d6c8df9be1d1dc5d65b29dcf Mon Sep 17 00:00:00 2001 From: Timerix Date: Fri, 23 May 2025 01:24:22 +0500 Subject: [PATCH] moved data to public dir --- ParadoxSaveParser.WebAPI/PathHelper.cs | 3 ++- ParadoxSaveParser.WebAPI/Program.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ParadoxSaveParser.WebAPI/PathHelper.cs b/ParadoxSaveParser.WebAPI/PathHelper.cs index 76ffee0..c9d3244 100644 --- a/ParadoxSaveParser.WebAPI/PathHelper.cs +++ b/ParadoxSaveParser.WebAPI/PathHelper.cs @@ -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"; diff --git a/ParadoxSaveParser.WebAPI/Program.cs b/ParadoxSaveParser.WebAPI/Program.cs index 46104b1..25b3f2c 100644 --- a/ParadoxSaveParser.WebAPI/Program.cs +++ b/ParadoxSaveParser.WebAPI/Program.cs @@ -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,