Fix bugs and add controller action for controller ws
This commit is contained in:
parent
8b1affd8c7
commit
6f8d63e7be
11 changed files with 177 additions and 56 deletions
emgauwa-lib/src/db
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue