Skip to content

Commit

Permalink
chore: turn record params to optional in API (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
giangndm authored Jul 20, 2024
1 parent 9e2b43a commit 314d417
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/src/http/api_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct WhipTokenReq {
room: String,
peer: String,
ttl: u64,
record: bool,
record: Option<bool>,
}

#[derive(poem_openapi::Object)]
Expand All @@ -49,7 +49,7 @@ struct WebrtcTokenReq {
room: Option<String>,
peer: Option<String>,
ttl: u64,
record: bool,
record: Option<bool>,
}

#[derive(poem_openapi::Object)]
Expand Down Expand Up @@ -80,7 +80,7 @@ impl<S: 'static + MediaGatewaySecure + Send + Sync> TokenApis<S> {
WhipToken {
room: body.room,
peer: body.peer,
record: body.record,
record: body.record.unwrap_or(false),
},
body.ttl,
),
Expand Down Expand Up @@ -129,7 +129,7 @@ impl<S: 'static + MediaGatewaySecure + Send + Sync> TokenApis<S> {
WebrtcToken {
room: body.room,
peer: body.peer,
record: body.record,
record: body.record.unwrap_or(false),
},
body.ttl,
),
Expand Down

0 comments on commit 314d417

Please sign in to comment.