1
0
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:
2021-05-15 09:19:43 +02:00
parent d933dadf62
commit cbf8d9b100
3 changed files with 17 additions and 0 deletions

View File

@ -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)