datum hinzu fügen
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Yew App</title>
|
||||
<title>Elternsprechtag</title>
|
||||
<link data-trunk rel="scss" href="static/my_bulma_colors.scss" />
|
||||
<link data-trunk rel="copy-file" href="static/logoheader.png" />
|
||||
<link data-trunk rel="copy-dir" href="static/webfonts" />
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use gloo::net::http::{Method, Request};
|
||||
use gloo::net::http::Request;
|
||||
use terminwahl_typen::{Nutzer, PlannedAppointment, RequestState};
|
||||
|
||||
use crate::Msg;
|
||||
|
||||
pub async fn fetch_teachers() -> Result<Msg, Msg> {
|
||||
// Send the request to the specified URL.
|
||||
let response = Request::new("/get/teachers").send().await;
|
||||
let response = Request::get("/get/teachers/1").send().await;
|
||||
// Return the ZuordnungMessage with the given network object and the response.
|
||||
let response = response
|
||||
.map_err(|_| Msg::AppointmentsSent(RequestState::Error))?
|
||||
@@ -17,7 +17,7 @@ pub async fn fetch_teachers() -> Result<Msg, Msg> {
|
||||
|
||||
pub async fn fetch_slots() -> Result<Msg, Msg> {
|
||||
// Send the request to the specified URL.
|
||||
let response = Request::new("/get/slots").send().await;
|
||||
let response = Request::get("/get/slots/1").send().await;
|
||||
// Return the ZuordnungMessage with the given network object and the response.
|
||||
let response = response
|
||||
.map_err(|_| Msg::AppointmentsSent(RequestState::Error))?
|
||||
@@ -29,7 +29,7 @@ pub async fn fetch_slots() -> Result<Msg, Msg> {
|
||||
|
||||
pub async fn fetch_unavailable() -> Result<Msg, Msg> {
|
||||
// Send the request to the specified URL.
|
||||
let response = Request::new("/get/unavailable").send().await;
|
||||
let response = Request::get("/get/unavailable").send().await;
|
||||
// Return the ZuordnungMessage with the given network object and the response.
|
||||
let response = response
|
||||
.map_err(|_| Msg::AppointmentsSent(RequestState::Error))?
|
||||
@@ -43,8 +43,7 @@ pub async fn send_appointments(
|
||||
appointments: Vec<PlannedAppointment>,
|
||||
nutzer: Nutzer,
|
||||
) -> Result<Msg, Msg> {
|
||||
let response = Request::new("/send/appointments")
|
||||
.method(Method::POST)
|
||||
let response = Request::post("/send/appointments")
|
||||
.json(&(&appointments, &nutzer))
|
||||
.map_err(|_| Msg::AppointmentsSent(RequestState::Error))?
|
||||
.send()
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
bulma.sass
|
||||
sass/
|
||||
webfonts/
|
||||
scss/
|
||||
sass
|
||||
webfonts
|
||||
scss
|
||||
*.zip
|
||||
bulma
|
||||
fontawesome*
|
||||
Reference in New Issue
Block a user