yet another typo fix

This commit is contained in:
Siddharth Singh 2024-08-06 00:32:13 +05:30
parent 4f8ebb95f3
commit af70065d84
No known key found for this signature in database

View file

@ -39,7 +39,8 @@ async function buildTemplateOpts(params: PathParams, url: string): Promise<OpenG
}; };
try { try {
if (params.acct && !params.statusId) { if (params.acct && !params.statusId) {
const key = /[a-f0-9]/.test(params.acct) ? 'pubkey' : 'handle'; const key = /^[a-f0-9]{64}$/.test(params.acct) ? 'pubkey' : 'handle';
console.log(key);
const profile = await fetchProfile({ [key]: params.acct }); const profile = await fetchProfile({ [key]: params.acct });
const handle = await getHandle(params.acct, profile); const handle = await getHandle(params.acct, profile);
res.type = 'profile'; res.type = 'profile';