fix: parse current Portal URLS for system and template UUIDs correctly

This commit is contained in:
Andrew Welker
2025-11-12 16:58:23 -06:00
parent c55de61da9
commit 2c49fb9321

View File

@@ -44,9 +44,10 @@ namespace PepperDash.Essentials.Core.Config
var result = Regex.Match(SystemUrl, @"https?:\/\/.*\/systems\/(.*)\/#.*");
string uuid = result.Groups[1].Value;
return uuid;
} else
}
else
{
var result = Regex.Match(SystemUrl, @"https?:\/\/.*\/systems\/(.*)\/.*");
var result = Regex.Match(SystemUrl, @"https?:\/\/.*\/systems\/detail\/(.*)\/.*");
string uuid = result.Groups[1].Value;
return uuid;
}
@@ -69,9 +70,10 @@ namespace PepperDash.Essentials.Core.Config
var result = Regex.Match(TemplateUrl, @"https?:\/\/.*\/templates\/(.*)\/#.*");
string uuid = result.Groups[1].Value;
return uuid;
} else
}
else
{
var result = Regex.Match(TemplateUrl, @"https?:\/\/.*\/system-templates\/(.*)\/system-template-versions\/(.*)\/.*");
var result = Regex.Match(TemplateUrl, @"https?:\/\/.*\/system-templates\/detail\/(.*)\/system-template-versions\/detail\/(.*)\/.*");
string uuid = result.Groups[2].Value;
return uuid;
}