From 0f2f8822652088ee3df0c678a11690ea8381740f Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Thu, 15 Apr 2021 15:38:03 +0200 Subject: [PATCH] Follow database structure change --- src/data/api_client.rs | 4 ++-- src/helpers/api_helper.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/api_client.rs b/src/data/api_client.rs index 4f82853..11f2124 100644 --- a/src/data/api_client.rs +++ b/src/data/api_client.rs @@ -8,11 +8,11 @@ pub struct APIClient { pub domain: Option, pub comment: Option, pub default_expiration_time: u64, - pub firebase_token: Option, + pub firebase_service_account_file: Option, } impl APIClient { pub fn is_firebase_available(&self) -> bool { - self.firebase_token.is_some() + self.firebase_service_account_file.is_some() } } \ No newline at end of file diff --git a/src/helpers/api_helper.rs b/src/helpers/api_helper.rs index 5fbaca6..bebdd52 100644 --- a/src/helpers/api_helper.rs +++ b/src/helpers/api_helper.rs @@ -30,6 +30,6 @@ fn db_to_client(res: &database::RowResult) -> Res { domain: res.get_optional_str("domain")?, comment: res.get_optional_str("comment")?, 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")?, }) } \ No newline at end of file