Take 2
This commit is contained in:
parent
0a01cac57b
commit
bfe8fd83ac
|
@ -69,8 +69,12 @@ const parseType = (url: URL): Code["type"] => {
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Convert the pathname from "/ACME:user@example.org" => "user@example.org" */
|
/** Convert the pathname from "/ACME:user@example.org" => "user@example.org" */
|
||||||
const parseAccount = (url: URL): string =>
|
const parseAccount = (url: URL): string => {
|
||||||
url.pathname.split(":").at(-1).split("/").at(-1);
|
let p = url.pathname;
|
||||||
|
if (p.startsWith("/")) p = p.slice(1);
|
||||||
|
if (p.includes(":")) p = p.split(":").slice(1).join(":");
|
||||||
|
return p;
|
||||||
|
};
|
||||||
|
|
||||||
const _getIssuer = (uriPath: string, uriParams: { get?: any }): string => {
|
const _getIssuer = (uriPath: string, uriParams: { get?: any }): string => {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue