Skip to content

Commit

Permalink
adds default case if neither open nor open_string is parseable
Browse files Browse the repository at this point in the history
  • Loading branch information
gueldenstone committed May 12, 2024
1 parent 20151d0 commit 5595b67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub async fn set_state(
let parsed_open = new_state_data
.open_string
.to_owned()
.unwrap()
.unwrap_or("false".to_string())
.to_lowercase()
.parse::<bool>()
.map_err(|err| AppError {
Expand Down

0 comments on commit 5595b67

Please sign in to comment.