mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-13 20:47:04 +00:00
fix: parse current Portal URLS for system and template UUIDs correctly
This commit is contained in:
parent
c55de61da9
commit
2c49fb9321
1 changed files with 32 additions and 30 deletions
|
|
@ -44,9 +44,10 @@ namespace PepperDash.Essentials.Core.Config
|
||||||
var result = Regex.Match(SystemUrl, @"https?:\/\/.*\/systems\/(.*)\/#.*");
|
var result = Regex.Match(SystemUrl, @"https?:\/\/.*\/systems\/(.*)\/#.*");
|
||||||
string uuid = result.Groups[1].Value;
|
string uuid = result.Groups[1].Value;
|
||||||
return uuid;
|
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;
|
string uuid = result.Groups[1].Value;
|
||||||
return uuid;
|
return uuid;
|
||||||
}
|
}
|
||||||
|
|
@ -69,9 +70,10 @@ namespace PepperDash.Essentials.Core.Config
|
||||||
var result = Regex.Match(TemplateUrl, @"https?:\/\/.*\/templates\/(.*)\/#.*");
|
var result = Regex.Match(TemplateUrl, @"https?:\/\/.*\/templates\/(.*)\/#.*");
|
||||||
string uuid = result.Groups[1].Value;
|
string uuid = result.Groups[1].Value;
|
||||||
return uuid;
|
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;
|
string uuid = result.Groups[2].Value;
|
||||||
return uuid;
|
return uuid;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue