back-end: Minor fix related to phrase handling

Fixes passing an empty string to the db in (probably) rare cases.
This commit is contained in:
Stephen Seo 2022-04-27 14:15:54 +09:00
parent 665dff94fe
commit dcc9400483

View file

@ -56,10 +56,13 @@ fn handle_pairing_request(root: Value, tx: SyncSender<DBHandlerRequest>) -> Resu
phrase_str = phrase_str.split_at(idx).0;
}
}
if !phrase_str.is_empty() {
phrase = Some(phrase_str.to_owned());
}
}
}
}
if tx
.send(DBHandlerRequest::GetID {
response_sender: player_tx,