user-auth store test2
This commit is contained in:
@@ -26,6 +26,11 @@ impl Query {
|
||||
Book::find_by_id(id).one(db).await
|
||||
}
|
||||
|
||||
|
||||
pub async fn find_user_by_id(db: &DbConn, id: i32) -> Result<Option<user::Model>, DbErr> {
|
||||
User::find_by_id(id).one(db).await
|
||||
}
|
||||
|
||||
pub async fn list_all_users(db: &DbConn) -> Result<Vec<user::Model>, DbErr> {
|
||||
User::find().all(db).await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user