Merge pull request 'tailwind' (#651) from mmalmi/snort:main into main

This commit is contained in:
Martti Malmi
2023-10-15 18:28:07 +02:00
committed by Gitea
parent 28fa0b4bc8
commit a168465bdb
13 changed files with 1305 additions and 40 deletions

View File

@ -95,16 +95,16 @@ const System = new NostrSystem({
});
async function fetchProfile(key: string) {
const rsp = await fetch(`${CONFIG.httpCache}/profile/${key}`);
if (rsp.ok) {
try {
try {
const rsp = await fetch(`${CONFIG.httpCache}/profile/${key}`);
if (rsp.ok) {
const data = (await rsp.json()) as NostrEvent;
if (data) {
return mapEventToProfile(data);
}
} catch (e) {
console.error(e);
}
} catch (e) {
console.error(e);
}
}