cargo clippy fix
This commit is contained in:
@@ -51,20 +51,20 @@ impl Model {
|
||||
.await
|
||||
}
|
||||
pub async fn get_all_active_sessions(db: &DatabaseConnection) -> Result<Vec<Model>, DbErr> {
|
||||
Ok(Entity::find()
|
||||
Entity::find()
|
||||
.filter(Column::EndedAt.is_null())
|
||||
.all(db)
|
||||
.await?)
|
||||
.await
|
||||
}
|
||||
pub async fn get_active_by_stream_key_id(
|
||||
db: &DatabaseConnection,
|
||||
stream_key_id: i32,
|
||||
) -> Result<Option<Model>, DbErr> {
|
||||
Ok(Entity::find()
|
||||
Entity::find()
|
||||
.filter(Column::StreamKeyId.eq(stream_key_id))
|
||||
.filter(Column::EndedAt.is_null())
|
||||
.one(db)
|
||||
.await?)
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn clean_unended_streams(db: &DatabaseConnection) -> Result<u64, DbErr> {
|
||||
|
||||
Reference in New Issue
Block a user