fix: remove the latest api
This commit is contained in:
parent
dbd9e1a070
commit
6b5eda7756
@ -30,13 +30,8 @@ public static class UrlHelper
|
||||
|
||||
var parts = path.Split('/', StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
{
|
||||
if (!parts[i].Equals("api", StringComparison.CurrentCultureIgnoreCase)) continue;
|
||||
|
||||
parts = parts.Take(i).Concat(parts.Skip(i + 1)).ToArray();
|
||||
break;
|
||||
}
|
||||
if (parts[^1].Equals("api", StringComparison.CurrentCultureIgnoreCase))
|
||||
parts = parts.Take(parts.Length - 1).ToArray();
|
||||
|
||||
return CreateSubPath(string.Join("/", parts));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user