create CallbackInfo::get_callback method

This commit is contained in:
Akulij 2025-04-29 19:51:17 +03:00
parent 48bb7b133b
commit a00c0017bb

View File

@ -55,4 +55,8 @@ where
}) })
.await?) .await?)
} }
pub async fn get_callback<D: CallDB>(db: &mut D, id: &str) -> DbResult<Option<C>> {
Self::get(db, id).await.map(|co| co.map(|c| c.callback))
}
} }