add router
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
Todos.db
|
Todos.db
|
||||||
target/
|
target/
|
||||||
|
style/output.css
|
||||||
|
|||||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -2452,6 +2452,8 @@ dependencies = [
|
|||||||
"gloo",
|
"gloo",
|
||||||
"leptos",
|
"leptos",
|
||||||
"leptos_actix",
|
"leptos_actix",
|
||||||
|
"leptos_meta",
|
||||||
|
"leptos_router",
|
||||||
"log",
|
"log",
|
||||||
"serde",
|
"serde",
|
||||||
"server_fn 0.6.14",
|
"server_fn 0.6.14",
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ console_error_panic_hook = "0.1.7"
|
|||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
futures = "0.3.30"
|
futures = "0.3.30"
|
||||||
leptos = { git = "https://github.com/leptos-rs/leptos" }
|
leptos = { git = "https://github.com/leptos-rs/leptos" }
|
||||||
|
leptos_router = { git = "https://github.com/leptos-rs/leptos" }
|
||||||
|
leptos_meta = { git = "https://github.com/leptos-rs/leptos" }
|
||||||
leptos_actix = { git = "https://github.com/leptos-rs/leptos", optional = true }
|
leptos_actix = { git = "https://github.com/leptos-rs/leptos", optional = true }
|
||||||
log = "0.4.22"
|
log = "0.4.22"
|
||||||
simple_logger = "5.0"
|
simple_logger = "5.0"
|
||||||
@@ -36,6 +38,8 @@ ssr = [
|
|||||||
"dep:sqlx",
|
"dep:sqlx",
|
||||||
"leptos/ssr",
|
"leptos/ssr",
|
||||||
"leptos_actix",
|
"leptos_actix",
|
||||||
|
"leptos_meta/ssr",
|
||||||
|
"leptos_router/ssr",
|
||||||
"dep:tokio",
|
"dep:tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -52,7 +56,7 @@ site-root = "target/site"
|
|||||||
# Defaults to pkg
|
# Defaults to pkg
|
||||||
site-pkg-dir = "pkg"
|
site-pkg-dir = "pkg"
|
||||||
# [Optional] The source CSS file. If it ends with .sass or .scss then it will be compiled by dart-sass into CSS. The CSS is optimized by Lightning CSS before being written to <site-root>/<site-pkg>/app.css
|
# [Optional] The source CSS file. If it ends with .sass or .scss then it will be compiled by dart-sass into CSS. The CSS is optimized by Lightning CSS before being written to <site-root>/<site-pkg>/app.css
|
||||||
style-file = "./style.css"
|
style-file = "style/output.css"
|
||||||
# [Optional] Files in the asset-dir will be copied to the site-root directory
|
# [Optional] Files in the asset-dir will be copied to the site-root directory
|
||||||
assets-dir = "public"
|
assets-dir = "public"
|
||||||
# The IP and port (ex: 127.0.0.1:3000) where the server serves the content. Use it in your server setup.
|
# The IP and port (ex: 127.0.0.1:3000) where the server serves the content. Use it in your server setup.
|
||||||
|
|||||||
14
README.md
14
README.md
@@ -3,4 +3,16 @@ source : https://github.com/Oishh/leptos-axum-tailwind-start
|
|||||||
wasm-pack build --target=web --debug --no-default-features --features=hydrate
|
wasm-pack build --target=web --debug --no-default-features --features=hydrate
|
||||||
cargo run --no-default-features --features=ssr
|
cargo run --no-default-features --features=ssr
|
||||||
|
|
||||||
npx tailwindcss -i ./input.css -o ./style/output.css --watch
|
npx tailwindcss -i ./input.css -o ./pkg/output.css --watch
|
||||||
|
|
||||||
|
## features
|
||||||
|
[x] ssr
|
||||||
|
[ ] MySQL
|
||||||
|
[x] tailwindcss
|
||||||
|
[x] router
|
||||||
|
[ ] deploy
|
||||||
|
|
||||||
|
## pages
|
||||||
|
[ ] liens
|
||||||
|
[ ] formulaire
|
||||||
|
[ ] recap capteurs
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head></head>
|
|
||||||
<body class="dark:bg-slate-950 text-gray-50">
|
|
||||||
<div></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[toolchain]
|
|
||||||
channel = "stable" # test change
|
|
||||||
154
src/app.rs
154
src/app.rs
@@ -1,157 +1,47 @@
|
|||||||
use cfg_if::cfg_if;
|
use crate::values::FormValues;
|
||||||
use leptos::*;
|
use crate::todo::TodoApp;
|
||||||
|
use leptos::prelude::*;
|
||||||
use leptos_meta::*;
|
use leptos_meta::*;
|
||||||
use leptos_router::*;
|
use leptos_router::{
|
||||||
use serde::{Deserialize, Serialize};
|
components::{FlatRoutes, Route, Router},
|
||||||
|
ParamSegment, SsrMode, StaticSegment,
|
||||||
pub struct Option {
|
};
|
||||||
value: &'static str,
|
|
||||||
name: &'static str,
|
|
||||||
topic: &'static str,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub const OPTIONS: &[Option] = &[
|
|
||||||
Option {
|
|
||||||
value: "citerne",
|
|
||||||
name: "Citerne",
|
|
||||||
topic: "home/citerne/height",
|
|
||||||
},
|
|
||||||
Option {
|
|
||||||
value: "eau",
|
|
||||||
name: "Eau",
|
|
||||||
topic: "home/eau/volume",
|
|
||||||
},
|
|
||||||
Option {
|
|
||||||
value: "elec-hight",
|
|
||||||
name: "Electricité heure pleine",
|
|
||||||
topic: "home/elec-hight/pleine",
|
|
||||||
},
|
|
||||||
Option {
|
|
||||||
value: "elec-low",
|
|
||||||
name: "Electricité heure creuse",
|
|
||||||
topic: "home/elec-low/creuse",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
|
||||||
pub struct Value {
|
|
||||||
id: u16,
|
|
||||||
service: String,
|
|
||||||
capteur: String,
|
|
||||||
type_donnee: String,
|
|
||||||
donnee: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
|
||||||
#[cfg_attr(feature = "ssr", derive(sqlx::FromRow))]
|
|
||||||
struct HeftyData {
|
|
||||||
capteur: String,
|
|
||||||
value: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "ssr")]
|
|
||||||
pub mod ssr {
|
|
||||||
// use http::{header::SET_COOKIE, HeaderMap, HeaderValue, StatusCode};
|
|
||||||
use leptos::server_fn::ServerFnError;
|
|
||||||
use sqlx::{Connection, SqliteConnection};
|
|
||||||
|
|
||||||
pub async fn db() -> Result<SqliteConnection, ServerFnError> {
|
|
||||||
Ok(SqliteConnection::connect("sqlite:Todos.db").await?)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn App() -> impl IntoView {
|
pub fn App() -> impl IntoView {
|
||||||
|
// Provides context that manages stylesheets, titles, meta tags, etc.
|
||||||
provide_meta_context();
|
provide_meta_context();
|
||||||
|
let fallback = || view! { "Page not found." }.into_view();
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
|
|
||||||
<Stylesheet id="leptos" href="/pkg/tailwind.css"/>
|
|
||||||
<Link rel="shortcut icon" type_="image/ico" href="/favicon.ico"/>
|
|
||||||
<Router>
|
<Router>
|
||||||
<nav class="px-2 py-1 flex gap-3">
|
<nav class="flex gap-5 px-2 py-1 ">
|
||||||
<a href="/">Home</a>
|
<a href="/">Home</a>
|
||||||
<a href="/formulaire">Formulaire</a>
|
<a href="/formulaire">Formulaire</a>
|
||||||
|
<a href="/todos">Todos</a>
|
||||||
</nav>
|
</nav>
|
||||||
<main class="dark:bg-slate-900 text-gray-50 h-screen">
|
<main>
|
||||||
<Routes>
|
<FlatRoutes fallback>
|
||||||
<Route path="" view= move || view! { <Home/> }/>
|
<Route path=StaticSegment("/") view=Home ssr=SsrMode::Async/>
|
||||||
<Route path="/formulaire" view= move || view! { <Form/> }/>
|
<Route path=StaticSegment("/formulaire") view=FormValues ssr=SsrMode::Async />
|
||||||
</Routes>
|
<Route path=StaticSegment("/todos") view=TodoApp ssr=SsrMode::Async />
|
||||||
|
<Route path=StaticSegment("/*any") view=NotFound ssr=SsrMode::Async/>
|
||||||
|
</FlatRoutes>
|
||||||
</main>
|
</main>
|
||||||
</Router>
|
</Router>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
fn Home() -> impl IntoView {
|
pub fn Home() -> impl IntoView {
|
||||||
let (count, set_count) = create_signal(0);
|
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div class="my-0 mx-auto max-w-3xl text-center">
|
<h1>Home</h1>
|
||||||
<h2 class="p-6 text-4xl">"Welcome to Leptos with Tailwind"</h2>
|
|
||||||
<p class="px-10 pb-10 text-left">"Tailwind will scan your Rust files for Tailwind class names and compile them into a CSS file."</p>
|
|
||||||
<button
|
|
||||||
class="bg-amber-600 hover:bg-sky-700 px-5 py-3 text-white rounded-lg"
|
|
||||||
on:click=move |_| set_count.update(|count| *count += 1)
|
|
||||||
>
|
|
||||||
"Something's here | "
|
|
||||||
{move || if count() == 0 {
|
|
||||||
"Click me!".to_string()
|
|
||||||
} else {
|
|
||||||
count().to_string()
|
|
||||||
}}
|
|
||||||
" | Some more text"
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
fn Form() -> impl IntoView {
|
pub fn NotFound() -> impl IntoView {
|
||||||
let add_value = create_server_action::<AddValue>();
|
|
||||||
let value = add_value.value();
|
|
||||||
let has_error = move || value.with(|val| matches!(val, Some(Err(_))));
|
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div class="my-0 mx-auto max-w-3xl text-center">
|
<h1>Not Found</h1>
|
||||||
<h2 class="p-6 text-4xl">"Form"</h2>
|
|
||||||
|
|
||||||
<ActionForm action=add_value>
|
|
||||||
<div>
|
|
||||||
<label class="block">Capteur</label>
|
|
||||||
<select name="hefty_arg[capteur]">
|
|
||||||
{OPTIONS.into_iter()
|
|
||||||
.map(|option| view! { <option value={option.value}>{option.name}</option>})
|
|
||||||
.collect::<Vec<_>>()}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label class="block">Valeur</label>
|
|
||||||
<input type="text" name="hefty_arg[value]" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<button type="submit">Valider</button>
|
|
||||||
</div>
|
|
||||||
</ActionForm>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[server(AddValue, "/api/add-value")]
|
|
||||||
pub async fn add_value(hefty_arg: HeftyData) -> Result<(), ServerFnError> {
|
|
||||||
use self::ssr::*;
|
|
||||||
let mut conn = db().await?;
|
|
||||||
|
|
||||||
dbg!(&hefty_arg);
|
|
||||||
|
|
||||||
match sqlx::query("INSERT INTO donnees (service, donnee) VALUES ($1, $2)")
|
|
||||||
.bind(hefty_arg.capteur)
|
|
||||||
.bind(hefty_arg.value)
|
|
||||||
.execute(&mut conn)
|
|
||||||
.await
|
|
||||||
{
|
|
||||||
Ok(_) => Ok(()),
|
|
||||||
Err(e) => Err(ServerFnError::ServerError(e.to_string())),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
|
pub mod app;
|
||||||
pub mod todo;
|
pub mod todo;
|
||||||
|
pub mod values;
|
||||||
|
|
||||||
#[cfg(feature = "hydrate")]
|
#[cfg(feature = "hydrate")]
|
||||||
#[wasm_bindgen::prelude::wasm_bindgen]
|
#[wasm_bindgen::prelude::wasm_bindgen]
|
||||||
pub fn hydrate() {
|
pub fn hydrate() {
|
||||||
|
use app::App;
|
||||||
|
use todo::TodoApp;
|
||||||
|
|
||||||
|
use crate::app::*;
|
||||||
use crate::todo::*;
|
use crate::todo::*;
|
||||||
|
use crate::values::*;
|
||||||
console_error_panic_hook::set_once();
|
console_error_panic_hook::set_once();
|
||||||
_ = console_log::init_with_level(log::Level::Debug);
|
_ = console_log::init_with_level(log::Level::Debug);
|
||||||
|
|
||||||
leptos::mount::hydrate_body(TodoApp);
|
leptos::mount::hydrate_body(App);
|
||||||
}
|
}
|
||||||
|
|||||||
34
src/main.rs
34
src/main.rs
@@ -1,23 +1,31 @@
|
|||||||
mod todo;
|
mod todo;
|
||||||
|
mod values;
|
||||||
|
|
||||||
#[cfg(feature = "ssr")]
|
#[cfg(feature = "ssr")]
|
||||||
mod ssr {
|
mod ssr {
|
||||||
pub use crate::todo::*;
|
|
||||||
pub use actix_files::Files;
|
pub use actix_files::Files;
|
||||||
pub use actix_web::*;
|
pub use actix_web::*;
|
||||||
pub use leptos::prelude::*;
|
pub use leptos::prelude::*;
|
||||||
pub use leptos_actix::{generate_route_list, LeptosRoutes};
|
pub use leptos_actix::{generate_route_list, LeptosRoutes};
|
||||||
|
pub use rust_leptos::app::*;
|
||||||
|
|
||||||
#[get("/style.css")]
|
#[get("/style.css")]
|
||||||
pub async fn css() -> impl Responder {
|
pub async fn css() -> impl Responder {
|
||||||
actix_files::NamedFile::open_async("./style.css").await
|
actix_files::NamedFile::open_async("./style/output.css").await
|
||||||
|
}
|
||||||
|
|
||||||
|
#[get("/favicon.ico")]
|
||||||
|
pub async fn favicon() -> impl Responder {
|
||||||
|
actix_files::NamedFile::open_async("./target/site/favicon.ico").await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "ssr")]
|
#[cfg(feature = "ssr")]
|
||||||
#[actix_web::main]
|
#[actix_web::main]
|
||||||
async fn main() -> std::io::Result<()> {
|
async fn main() -> std::io::Result<()> {
|
||||||
use self::{ssr::*, todo::ssr::*};
|
use self::{ssr::*, values::ssr::*};
|
||||||
|
|
||||||
|
use leptos_meta::*;
|
||||||
|
|
||||||
let mut conn = db().await.expect("couldn't connect to DB");
|
let mut conn = db().await.expect("couldn't connect to DB");
|
||||||
sqlx::migrate!()
|
sqlx::migrate!()
|
||||||
@@ -31,37 +39,35 @@ async fn main() -> std::io::Result<()> {
|
|||||||
|
|
||||||
HttpServer::new(move || {
|
HttpServer::new(move || {
|
||||||
// Generate the list of routes in your Leptos App
|
// Generate the list of routes in your Leptos App
|
||||||
let routes = generate_route_list(TodoApp);
|
let routes = generate_route_list(App);
|
||||||
let leptos_options = &conf.leptos_options;
|
let leptos_options = &conf.leptos_options;
|
||||||
let site_root = &leptos_options.site_root;
|
let site_root = &leptos_options.site_root;
|
||||||
|
|
||||||
App::new()
|
App::new()
|
||||||
|
.service(css)
|
||||||
.leptos_routes(routes, {
|
.leptos_routes(routes, {
|
||||||
let leptos_options = leptos_options.clone();
|
let leptos_options = leptos_options.clone();
|
||||||
move || {
|
move || {
|
||||||
use leptos::prelude::*;
|
use leptos::prelude::*;
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
name="viewport"
|
<Stylesheet href="/pkg/rust_leptos.css"/>
|
||||||
content="width=device-width, initial-scale=1"
|
|
||||||
/>
|
|
||||||
<AutoReload options=leptos_options.clone() />
|
<AutoReload options=leptos_options.clone() />
|
||||||
<HydrationScripts options=leptos_options.clone()/>
|
<HydrationScripts options=leptos_options.clone()/>
|
||||||
|
<MetaTags/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="dark:bg-slate-900 dark:text-gray-50">
|
||||||
<TodoApp/>
|
<App/>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
}
|
}
|
||||||
}
|
}})
|
||||||
})
|
|
||||||
.service(Files::new("/", site_root))
|
.service(Files::new("/", site_root))
|
||||||
//.wrap(middleware::Compress::default())
|
.wrap(middleware::Compress::default())
|
||||||
})
|
})
|
||||||
.bind(&addr)?
|
.bind(&addr)?
|
||||||
.run()
|
.run()
|
||||||
|
|||||||
118
src/values.rs
Normal file
118
src/values.rs
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
use leptos::prelude::*;
|
||||||
|
use leptos_meta::*;
|
||||||
|
use leptos_router::*;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
pub struct Option {
|
||||||
|
value: &'static str,
|
||||||
|
name: &'static str,
|
||||||
|
topic: &'static str,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const OPTIONS: &[Option] = &[
|
||||||
|
Option {
|
||||||
|
value: "citerne",
|
||||||
|
name: "Citerne",
|
||||||
|
topic: "home/citerne/height",
|
||||||
|
},
|
||||||
|
Option {
|
||||||
|
value: "eau",
|
||||||
|
name: "Eau",
|
||||||
|
topic: "home/eau/volume",
|
||||||
|
},
|
||||||
|
Option {
|
||||||
|
value: "elec-hight",
|
||||||
|
name: "Electricité heure pleine",
|
||||||
|
topic: "home/elec-hight/pleine",
|
||||||
|
},
|
||||||
|
Option {
|
||||||
|
value: "elec-low",
|
||||||
|
name: "Electricité heure creuse",
|
||||||
|
topic: "home/elec-low/creuse",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
|
pub struct Value {
|
||||||
|
id: u16,
|
||||||
|
service: String,
|
||||||
|
capteur: String,
|
||||||
|
type_donnee: String,
|
||||||
|
donnee: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
|
#[cfg_attr(feature = "ssr", derive(sqlx::FromRow))]
|
||||||
|
struct HeftyData {
|
||||||
|
capteur: String,
|
||||||
|
value: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "ssr")]
|
||||||
|
pub mod ssr {
|
||||||
|
// use http::{header::SET_COOKIE, HeaderMap, HeaderValue, StatusCode};
|
||||||
|
use leptos::server_fn::ServerFnError;
|
||||||
|
use sqlx::{Connection, SqliteConnection};
|
||||||
|
|
||||||
|
pub async fn db() -> Result<SqliteConnection, ServerFnError> {
|
||||||
|
Ok(SqliteConnection::connect("sqlite:Todos.db").await?)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[component]
|
||||||
|
fn Form() -> impl IntoView {
|
||||||
|
view! {
|
||||||
|
<div class="my-0 mx-auto max-w-3xl text-center">
|
||||||
|
<h2 class="p-6 text-4xl">"Formulaire"</h2>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[component]
|
||||||
|
pub fn FormValues() -> impl IntoView {
|
||||||
|
let add_value = ServerAction::<AddValue>::new();
|
||||||
|
let value = add_value.value();
|
||||||
|
let has_error = move || value.with(|val| matches!(val, Some(Err(_))));
|
||||||
|
|
||||||
|
view! {
|
||||||
|
<div class="my-0 mx-auto max-w-3xl text-center">
|
||||||
|
<h2 class="p-6 text-4xl">"Formulaire"</h2>
|
||||||
|
|
||||||
|
<ActionForm action=add_value attr:class="border">
|
||||||
|
<div>
|
||||||
|
<label class="block">Capteur</label>
|
||||||
|
<select name="hefty_arg[capteur]">
|
||||||
|
{OPTIONS.into_iter()
|
||||||
|
.map(|option| view! { <option value={option.value}>{option.name}</option>})
|
||||||
|
.collect::<Vec<_>>()}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label class="block">Valeur</label>
|
||||||
|
<input type="text" name="hefty_arg[value]" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button type="submit">Valider</button>
|
||||||
|
</div>
|
||||||
|
</ActionForm>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[server(AddValue, "/api/add-value")]
|
||||||
|
pub async fn add_value(hefty_arg: HeftyData) -> Result<(), ServerFnError> {
|
||||||
|
use self::ssr::*;
|
||||||
|
let mut conn = db().await?;
|
||||||
|
|
||||||
|
dbg!(&hefty_arg);
|
||||||
|
|
||||||
|
match sqlx::query("INSERT INTO donnees (service, donnee) VALUES ($1, $2)")
|
||||||
|
.bind(hefty_arg.capteur)
|
||||||
|
.bind(hefty_arg.value)
|
||||||
|
.execute(&mut conn)
|
||||||
|
.await
|
||||||
|
{
|
||||||
|
Ok(_) => Ok(()),
|
||||||
|
Err(e) => Err(ServerFnError::ServerError(e.to_string())),
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user