mirror of
https://codeberg.org/slatian/service.echoip-slatecave.git
synced 2024-12-27 04:08:20 +01:00
Messages now have a title and a message
This commit is contained in:
parent
b9fc472120
commit
c4379d4c19
@ -264,7 +264,10 @@ async fn hello_world_handler(
|
||||
|
||||
state.templating_engine.render_view(
|
||||
&settings,
|
||||
&View::Message("Hello! There, You, Awesome Creature!".to_string())
|
||||
&View::Message{
|
||||
title: "Hey There!".to_string(),
|
||||
message: "You,You are an awesome Creature!".to_string()
|
||||
},
|
||||
).await
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ pub enum View {
|
||||
Dig { query: DigQuery, result: simple_dns::DnsLookupResult },
|
||||
Index { query: IpQuery, result: IpResult },
|
||||
Ip { query: IpQuery, result: IpResult },
|
||||
Message(String),
|
||||
Message{ title: String, message: String },
|
||||
#[serde(rename="404")]
|
||||
NotFound,
|
||||
}
|
||||
@ -67,7 +67,7 @@ impl View {
|
||||
View::Dig{..} => "dig",
|
||||
View::Index{..} => "index",
|
||||
View::Ip{..} => "ip",
|
||||
View::Message(..) => "message",
|
||||
View::Message{..} => "message",
|
||||
View::NotFound => "404",
|
||||
}.to_string()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user