mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-10 22:22:48 +02:00
Cleanup/improve other async queries in some client handlers.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
116f85360f
commit
af4f66c768
16 changed files with 2977 additions and 2818 deletions
|
@ -412,7 +412,9 @@ pub(super) async fn change_log_level(&self, filter: Option<String>, reset: bool)
|
|||
.reload
|
||||
.reload(&new_filter_layer, Some(handles))
|
||||
{
|
||||
| Ok(()) => return self.write_str("Successfully changed log level").await,
|
||||
| Ok(()) => {
|
||||
return self.write_str("Successfully changed log level").await;
|
||||
},
|
||||
| Err(e) => {
|
||||
return Err!("Failed to modify and reload the global tracing log level: {e}");
|
||||
},
|
||||
|
|
|
@ -94,8 +94,7 @@ async fn process_command(services: Arc<Services>, input: &CommandInput) -> Proce
|
|||
|
||||
#[allow(clippy::result_large_err)]
|
||||
fn handle_panic(error: &Error, command: &CommandInput) -> ProcessorResult {
|
||||
let link =
|
||||
"Please submit a [bug report](https://forgejo.ellis.link/continuwuation/continuwuity/issues/new). 🥺";
|
||||
let link = "Please submit a [bug report](https://forgejo.ellis.link/continuwuation/continuwuity/issues/new). 🥺";
|
||||
let msg = format!("Panic occurred while processing command:\n```\n{error:#?}\n```\n{link}");
|
||||
let content = RoomMessageEventContent::notice_markdown(msg);
|
||||
error!("Panic while processing command: {error:?}");
|
||||
|
|
|
@ -286,8 +286,9 @@ pub(super) async fn reset_password(&self, username: String, password: Option<Str
|
|||
.set_password(&user_id, Some(new_password.as_str()))
|
||||
{
|
||||
| Err(e) => return Err!("Couldn't reset the password for user {user_id}: {e}"),
|
||||
| Ok(()) =>
|
||||
write!(self, "Successfully reset the password for user {user_id}: `{new_password}`"),
|
||||
| Ok(()) => {
|
||||
write!(self, "Successfully reset the password for user {user_id}: `{new_password}`")
|
||||
},
|
||||
}
|
||||
.await
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue