add download button to image

This commit is contained in:
Ren Amamiya
2023-07-23 17:27:51 +07:00
parent 13ca8a2c54
commit 71c4f3db22
6 changed files with 48 additions and 8 deletions

View File

@@ -482,7 +482,7 @@ export async function getUserMetadata(pubkey: string) {
const db = await connect();
const result = await db.select(`SELECT * FROM metadata WHERE pubkey = "${pubkey}";`);
if (result[0]) {
return JSON.parse(result[0].content) as Profile;
return { ...result[0], ...JSON.parse(result[0].content) } as Profile;
} else {
return null;
}