add nostr-fetch

This commit is contained in:
Ren Amamiya
2023-07-11 14:27:14 +07:00
parent 339783a1a4
commit 41460436df
11 changed files with 202 additions and 163 deletions

View File

@@ -440,7 +440,9 @@ export async function createMetadata(id: string, pubkey: string, content: string
// get metadata
export async function getUserMetadata(pubkey: string) {
const db = await connect();
const result = await db.select(`SELECT content FROM metadata WHERE id = "${pubkey}";`);
const result = await db.select(
`SELECT content, created_at FROM metadata WHERE id = "${pubkey}";`
);
if (result[0]) {
return JSON.parse(result[0].content);
} else {