mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 13:29:21 +00:00
Follow database structure change
This commit is contained in:
parent
720ea04268
commit
0f2f882265
@ -8,11 +8,11 @@ pub struct APIClient {
|
|||||||
pub domain: Option<String>,
|
pub domain: Option<String>,
|
||||||
pub comment: Option<String>,
|
pub comment: Option<String>,
|
||||||
pub default_expiration_time: u64,
|
pub default_expiration_time: u64,
|
||||||
pub firebase_token: Option<String>,
|
pub firebase_service_account_file: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl APIClient {
|
impl APIClient {
|
||||||
pub fn is_firebase_available(&self) -> bool {
|
pub fn is_firebase_available(&self) -> bool {
|
||||||
self.firebase_token.is_some()
|
self.firebase_service_account_file.is_some()
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -30,6 +30,6 @@ fn db_to_client(res: &database::RowResult) -> Res<APIClient> {
|
|||||||
domain: res.get_optional_str("domain")?,
|
domain: res.get_optional_str("domain")?,
|
||||||
comment: res.get_optional_str("comment")?,
|
comment: res.get_optional_str("comment")?,
|
||||||
default_expiration_time: res.get_u64("default_expiration_time")?,
|
default_expiration_time: res.get_u64("default_expiration_time")?,
|
||||||
firebase_token: res.get_optional_str("firebase_token")?,
|
firebase_service_account_file: res.get_optional_str("firebase_service_account_file")?,
|
||||||
})
|
})
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user