mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-07-11 10:02:48 +00:00
Can get the list of administrators from the api
This commit is contained in:
@ -32,6 +32,12 @@ pub fn exists(id: AdminID) -> Res<bool> {
|
||||
.map(|r| r > 0)
|
||||
}
|
||||
|
||||
/// Get the entire list of administrators
|
||||
pub fn get_list() -> Res<Vec<Admin>> {
|
||||
database::QueryInfo::new(ADMIN_LIST_TABLE)
|
||||
.exec(db_to_admin)
|
||||
}
|
||||
|
||||
/// Get admin information by ID
|
||||
pub fn find_admin_by_id(id: AdminID) -> Res<Admin> {
|
||||
database::QueryInfo::new(ADMIN_LIST_TABLE)
|
||||
|
Reference in New Issue
Block a user