2025-02-23 18:29:12 -05:00

30 lines
729 B
Rust

#[cfg(feature = "server")]
use leptos::prelude::*;
use serde::{Deserialize, Serialize};
use crate::version::Version;
#[derive(Serialize, Deserialize)]
pub struct Update;
#[async_trait::async_trait]
impl super::Action for Update {
const REQ_VERSION: Version = Version::new(2, 0);
const REQ_OS: Option<&'static str> = None;
const REQ_FIELDS: &'static [(&'static str, &'static str, Option<&'static str>)] = &[];
type ActionData = ();
#[cfg(feature = "beacon")]
async fn execute(&self) -> Self::ActionData {
"Hello".to_string();
}
#[cfg(feature = "server")]
fn render_data(&self, _data: Self::ActionData) -> impl IntoView {
view! {
"update ran"
}
}
}