diff --git a/bin/src/http/api_token.rs b/bin/src/http/api_token.rs index a70fc8a3..6dccc949 100644 --- a/bin/src/http/api_token.rs +++ b/bin/src/http/api_token.rs @@ -24,7 +24,7 @@ struct WhipTokenReq { room: String, peer: String, ttl: u64, - record: bool, + record: Option, } #[derive(poem_openapi::Object)] @@ -49,7 +49,7 @@ struct WebrtcTokenReq { room: Option, peer: Option, ttl: u64, - record: bool, + record: Option, } #[derive(poem_openapi::Object)] @@ -80,7 +80,7 @@ impl TokenApis { WhipToken { room: body.room, peer: body.peer, - record: body.record, + record: body.record.unwrap_or(false), }, body.ttl, ), @@ -129,7 +129,7 @@ impl TokenApis { WebrtcToken { room: body.room, peer: body.peer, - record: body.record, + record: body.record.unwrap_or(false), }, body.ttl, ),