diff --git a/crates/server/Cargo.toml b/crates/server/Cargo.toml index f45c091..8956638 100644 --- a/crates/server/Cargo.toml +++ b/crates/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "server" -version = "0.3.0" +version = "0.4.0" edition = "2024" [target.x86_64-unknown-linux-gnu] diff --git a/crates/server/src/webrtc_ingest.rs b/crates/server/src/webrtc_ingest.rs index ecc0337..eea4d4b 100644 --- a/crates/server/src/webrtc_ingest.rs +++ b/crates/server/src/webrtc_ingest.rs @@ -9,8 +9,8 @@ use axum::{ use bytes::Bytes; use chrono::{Local, Utc}; use dashmap::DashMap; -use entity::{stream_key, stream_session}; -use sea_orm::{DatabaseConnection, IntoActiveModel}; +use entity::{stream_key, stream_session, users}; +use sea_orm::{DatabaseConnection, EntityTrait, IntoActiveModel}; use str0m::{ Candidate, Event, Input, Output, Rtc, change::SdpOffer, @@ -279,7 +279,7 @@ pub async fn handle_whip_injest( audio_tx.set_overflow(true); let user = users::Entity::find_by_id(key.user_id) - .one(&db) + .one(&state.db) .await .unwrap() .unwrap();