Apply small fixes and prepare emgauwa-controller

This commit is contained in:
Tobias Reisinger 2023-11-22 23:28:03 +01:00
parent bacea1e3e9
commit d5583e86bc
9 changed files with 150 additions and 6 deletions
emgauwa-lib
Cargo.toml
src/handlers/v1/ws

View file

@ -1,9 +1,10 @@
[package]
name = "emgauwa-lib"
version = "0.1.0"
version = "0.5.0"
edition = "2021"
authors = ["Tobias Reisinger <tobias@msrg.cc>"]
[dependencies]
actix = "0.13"
actix-web = "4.4"

View file

@ -21,7 +21,6 @@ async fn get_schedules(pool: &mut Pool<Sqlite>) -> Result<Vec<Schedule>, ApiErro
Ok(Schedule::get_all(&mut pool_conn).await?)
}
/// Handler for ws::Message message
impl StreamHandler<Result<Message, ProtocolError>> for ControllerWs {
fn handle(&mut self, msg: Result<Message, ProtocolError>, ctx: &mut Self::Context) {
let schedules = futures::executor::block_on(get_schedules(&mut self.pool)).unwrap();