init
This commit is contained in:
@@ -17,6 +17,10 @@ impl GroupRepository {
|
||||
.await?)
|
||||
}
|
||||
|
||||
pub async fn get_all(&self) -> AnyResult<Vec<group::Model>> {
|
||||
Ok(group::Entity::find().all(&self.context.db).await?)
|
||||
}
|
||||
|
||||
pub async fn get_by_id(&self, id: Uuid) -> AnyResult<Option<group::Model>> {
|
||||
Ok(group::Entity::find_by_id(id).one(&self.context.db).await?)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user