refactor(#2302): type socket wire fields as ident, validated by serde on deserialize
This commit is contained in:
parent
bf644cc126
commit
84b750fba5
33 changed files with 333 additions and 263 deletions
|
|
@ -59,7 +59,7 @@ async fn matrix_create_user(
|
|||
matrix_request(
|
||||
socket,
|
||||
hive_host_sock::HostRequest::MatrixCreateUser {
|
||||
name: name.to_owned(),
|
||||
name: crate::util::parse_ident(name)?,
|
||||
password,
|
||||
},
|
||||
)
|
||||
|
|
@ -74,7 +74,7 @@ async fn matrix_promote_user(socket: &Path, name: &str) -> Result<()> {
|
|||
matrix_request(
|
||||
socket,
|
||||
hive_host_sock::HostRequest::MatrixPromoteUser {
|
||||
name: name.to_owned(),
|
||||
name: crate::util::parse_ident(name)?,
|
||||
},
|
||||
)
|
||||
.await
|
||||
|
|
@ -95,7 +95,7 @@ async fn matrix_reset_password(socket: &Path, name: &str) -> Result<()> {
|
|||
matrix_request(
|
||||
socket,
|
||||
hive_host_sock::HostRequest::MatrixResetPassword {
|
||||
name: name.to_owned(),
|
||||
name: crate::util::parse_ident(name)?,
|
||||
},
|
||||
)
|
||||
.await
|
||||
|
|
|
|||
Loading…
Reference in a new issue