Revert notification endpoint URL for dev

This commit is contained in:
Gregory Schier
2025-06-27 11:58:04 -07:00
parent bb0cc16a70
commit 25d50246c0
5 changed files with 10 additions and 10 deletions

View File

@@ -1302,7 +1302,7 @@ pub fn run() {
tokio::time::sleep(Duration::from_millis(4000)).await;
let val: State<'_, Mutex<YaakNotifier>> = w.state();
let mut n = val.lock().await;
if let Err(e) = n.check(&w).await {
if let Err(e) = n.maybe_check(&w).await {
warn!("Failed to check for notifications {}", e)
}
});

View File

@@ -63,7 +63,7 @@ impl YaakNotifier {
Ok(())
}
pub async fn check<R: Runtime>(&mut self, window: &WebviewWindow<R>) -> Result<()> {
pub async fn maybe_check<R: Runtime>(&mut self, window: &WebviewWindow<R>) -> Result<()> {
let app_handle = window.app_handle();
let ignore_check = self.last_check.elapsed().unwrap().as_secs() < MAX_UPDATE_CHECK_SECONDS;
@@ -83,7 +83,7 @@ impl YaakNotifier {
let num_launches = get_num_launches(app_handle).await;
let info = app_handle.package_info().clone();
let req = yaak_api_client(app_handle)?
.request(Method::GET, "http://localhost:9444/notifications")
.request(Method::GET, "https://notify.yaak.app/notifications")
.query(&[
("version", info.version.to_string().as_str()),
("launches", num_launches.to_string().as_str()),