mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
log stuff
This commit is contained in:
parent
9175596d5f
commit
a3012d341b
2 changed files with 6 additions and 1 deletions
|
|
@ -60,7 +60,8 @@ export const frontendController: AppMiddleware = async (c, next) => {
|
|||
try {
|
||||
const meta = metadataView(await buildTemplateOpts(params, Conf.local(c.req.path)));
|
||||
return c.html(content.replace(META_PLACEHOLDER, meta));
|
||||
} catch {
|
||||
} catch (e) {
|
||||
console.debug(e);
|
||||
return c.html(content);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,12 @@ import { getEvent } from '@/queries.ts';
|
|||
import { nip19, nip27 } from 'nostr-tools';
|
||||
import { match } from 'path-to-regexp';
|
||||
|
||||
import { Stickynotes } from '@soapbox/stickynotes';
|
||||
import { lookupAccount, lookupPubkey } from '@/utils/lookup.ts';
|
||||
import { parseAndVerifyNip05 } from '@/utils/nip05.ts';
|
||||
|
||||
const console = new Stickynotes('ditto:frontend');
|
||||
|
||||
export interface OpenGraphTemplateOpts {
|
||||
title: string;
|
||||
type: 'article' | 'profile' | 'website';
|
||||
|
|
@ -78,6 +81,7 @@ type ProfileInfo = { name: string; about: string } & NostrMetadata;
|
|||
* or sensible defaults if the kind 0 has those values missing.
|
||||
*/
|
||||
export async function getProfileInfo(handle: string | undefined): Promise<ProfileInfo> {
|
||||
console.debug(handle);
|
||||
const acc = await lookupAccount(handle || '');
|
||||
if (!acc) throw new Error('Invalid handle specified, or account not found.');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue