Merge branch 'acct-parse-url' into lookup-api

This commit is contained in:
tamaina 2025-08-30 18:43:54 +09:00
commit 2afb9fe5ab
1 changed files with 2 additions and 0 deletions

View File

@ -43,6 +43,8 @@ export function parseUrl(str: string): Acct {
if (url.search.length > 0) throw new UrlIsNotAcctLikeError();
const splited = url.pathname.split('/');
if (splited.length !== 2) throw new UrlIsNotAcctLikeError();
const path = splited[1];
if (!path) throw new UrlIsNotAcctLikeError();