Use const

This commit is contained in:
benthecarman
2023-08-21 19:02:27 -05:00
parent 307c0965c4
commit fffef50de4

View File

@@ -159,10 +159,7 @@ pub async fn send_nostr_events(events: Vec<Event>, part: u32) -> Result<Vec<Even
} }
} else { } else {
console_log!("no cache hit for relays"); console_log!("no cache hit for relays");
match Fetch::Url("https://api.nostr.watch/v1/online".parse().unwrap()) match Fetch::Url(RELAY_LIST_URL.parse().unwrap()).send().await {
.send()
.await
{
Ok(mut nostr_resp) => { Ok(mut nostr_resp) => {
console_log!("retrieved online relay list"); console_log!("retrieved online relay list");
match nostr_resp.json::<Vec<String>>().await { match nostr_resp.json::<Vec<String>>().await {