apps: get all with filter, serde
This commit is contained in:
parent
842be36a1b
commit
42d88cc2dd
9 changed files with 259 additions and 1 deletions
|
|
@ -22,6 +22,17 @@ impl From<DatabaseApps> for App {
|
|||
}
|
||||
|
||||
impl App {
|
||||
pub async fn get_all(
|
||||
conn: impl SqliteExecutor<'_>,
|
||||
filter_get_archived: Option<bool>,
|
||||
) -> Result<Vec<Self>, Error> {
|
||||
Ok(DatabaseApps::get_all(conn, filter_get_archived)
|
||||
.await?
|
||||
.into_iter()
|
||||
.map(Self::from)
|
||||
.collect::<Vec<_>>())
|
||||
}
|
||||
|
||||
pub async fn insert(
|
||||
conn: impl SqliteExecutor<'_>,
|
||||
id: &AppID,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue