use crate::http_client::HttpClient;
use crate::url;
use serde_json::json;

pub async fn post_request(time: String) -> String {
    let url = url(&"notify_update");
    let client = HttpClient::new();

    let post = json!({
        "seenAt": time.to_string(),
    });

    match client.post_json_with_auth(&url, &post).await {
        Ok(response) => response,
        Err(e) => format!("Error: {}", e),
    }
}
