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/src/handlers/v1/ws

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();