resolve #3189 - make path a querystring parameter

This commit is contained in:
sbwalker
2023-08-25 09:49:07 -04:00
parent 4de809e275
commit 95de1fff69
3 changed files with 5 additions and 4 deletions

View File

@ -84,10 +84,11 @@ namespace Oqtane.Controllers
}
}
[HttpGet("{siteId}/{path}")]
// GET api/<controller>/path/x/?path=y
[HttpGet("path/{siteId}")]
public Folder GetByPath(int siteId, string path)
{
var folderPath = WebUtility.UrlDecode(path).Replace("\\", "/");
var folderPath = WebUtility.UrlDecode(path).Replace("\\", "/"); // handle legacy path format
folderPath = (folderPath == "/") ? "" : folderPath;
if (!folderPath.EndsWith("/") && folderPath != "")
{