Apply small fixes and prepare emgauwa-controller
This commit is contained in:
parent
bacea1e3e9
commit
d5583e86bc
9 changed files with 150 additions and 6 deletions
emgauwa-lib
|
@ -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"
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue