another minor register handler fix for handlers with parameters
This commit is contained in:
@@ -94,9 +94,9 @@ public class ApiServer(string apiUrl) : IApiServer
|
||||
{
|
||||
var name = url.Substring(nextBreacket + 1, endBreacket - nextBreacket - 1);
|
||||
const string regex = "[A-Za-z0-9%]+";
|
||||
url = url.Replace(url.Substring(nextBreacket, endBreacket + 1), regex);
|
||||
url = url.Replace(url.Substring(nextBreacket, endBreacket - nextBreacket + 1), regex);
|
||||
|
||||
var index = url.Substring(0, nextBreacket + 1).Split('/').Length;
|
||||
var index = url[..(nextBreacket + 1)].Split('/').Length - 1;
|
||||
parameters.Add(new(name, index));
|
||||
|
||||
useRegEx = true;
|
||||
|
||||
Reference in New Issue
Block a user