flash is post request
This commit is contained in:
parent
b5d568a1f2
commit
dc81a3cf6e
|
@ -42,7 +42,7 @@ fn App() -> Html {
|
|||
.collect();
|
||||
let flash = move |_| {
|
||||
wasm_bindgen_futures::spawn_local(async move {
|
||||
match reqwasm::http::Request::get(&format!("{API_URL}/flash"))
|
||||
match reqwasm::http::Request::post(&format!("{API_URL}/flash"))
|
||||
.send()
|
||||
.await
|
||||
{
|
||||
|
|
|
@ -118,7 +118,7 @@ async fn charge_state(state: &State<ServerState>) -> Option<Json<shared_types::C
|
|||
Some(Json(charge_state))
|
||||
}
|
||||
|
||||
#[get("/flash")]
|
||||
#[post("/flash")]
|
||||
async fn flash(state: &State<ServerState>) {
|
||||
state.flash().await;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue