Fix bugs and add controller action for controller ws

This commit is contained in:
Tobias Reisinger 2023-12-05 16:11:40 +01:00
parent 8b1affd8c7
commit 6f8d63e7be
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
11 changed files with 177 additions and 56 deletions
emgauwa-lib/src/db

View file

@ -172,4 +172,13 @@ impl DbController {
.await?;
Ok(())
}
pub async fn reload(
&self,
conn: &mut PoolConnection<Sqlite>,
) -> Result<DbController, DatabaseError> {
Self::get(conn, self.id)
.await?
.ok_or(DatabaseError::NotFound)
}
}