Take 2
This commit is contained in:
parent
0a01cac57b
commit
bfe8fd83ac
1 changed files with 6 additions and 2 deletions
|
@ -69,8 +69,12 @@ const parseType = (url: URL): Code["type"] => {
|
|||
};
|
||||
|
||||
/** Convert the pathname from "/ACME:user@example.org" => "user@example.org" */
|
||||
const parseAccount = (url: URL): string =>
|
||||
url.pathname.split(":").at(-1).split("/").at(-1);
|
||||
const parseAccount = (url: URL): string => {
|
||||
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 => {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue