Cleanup: over-engineering pass
- merge /api/uptime + /api/version into /api/health and /api/stats - collapse RTMP per-codec dispatch into a single CodecParser path - dedupe STUN attribute walking (ufrag_pair / parse_xor_mapped_address) - dedupe StreamCodec <-> str0m Codec mapping via StreamCodec::from_str0m - dedupe bearer token extraction in WHIP handlers - replace regex charset validation with stdlib checks - flatten one-field wrappers (WebRtcProxyConfig, HttpServerConfig, ServerInfo) - remove SessionCookie extractor (only fed debug logs) - delete dead code: entity ActiveModel helpers, get_stream_session, WebrtcProxy::local_addr, _connected flag, commented-out blocks - drop unused deps: futures, rand, regex, serde_json
This commit is contained in:
@@ -91,27 +91,3 @@ impl Entity {
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
impl ActiveModel {
|
||||
pub async fn change_label_value(
|
||||
mut self,
|
||||
db: &DatabaseConnection,
|
||||
value: String,
|
||||
) -> Result<Model, DbErr> {
|
||||
self.label = Set(value);
|
||||
self.update(db).await
|
||||
}
|
||||
|
||||
pub async fn password(
|
||||
mut self,
|
||||
db: &DatabaseConnection,
|
||||
value: String,
|
||||
) -> Result<Model, DbErr> {
|
||||
self.password = if value.is_empty() {
|
||||
Set(None)
|
||||
} else {
|
||||
Set(Some(value))
|
||||
};
|
||||
self.update(db).await
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user