diff options
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs index 56619b8..f5dba98 100644 --- a/src/config.rs +++ b/src/config.rs | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | use anyhow::{anyhow, Result}; | 1 | use anyhow::{anyhow, Result}; |
| 2 | use directories::ProjectDirs; | 2 | use directories::ProjectDirs; |
| 3 | use nostr::PublicKey; | 3 | use nostr::PublicKey; |
| 4 | use nostr_sdk::Timestamp; | ||
| 4 | use serde::{self, Deserialize, Serialize}; | 5 | use serde::{self, Deserialize, Serialize}; |
| 5 | 6 | ||
| 6 | pub fn get_dirs() -> Result<ProjectDirs> { | 7 | pub fn get_dirs() -> Result<ProjectDirs> { |
| @@ -19,13 +20,13 @@ pub struct UserRef { | |||
| 19 | #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] | 20 | #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] |
| 20 | pub struct UserMetadata { | 21 | pub struct UserMetadata { |
| 21 | pub name: String, | 22 | pub name: String, |
| 22 | pub created_at: u64, | 23 | pub created_at: Timestamp, |
| 23 | } | 24 | } |
| 24 | 25 | ||
| 25 | #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] | 26 | #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] |
| 26 | pub struct UserRelays { | 27 | pub struct UserRelays { |
| 27 | pub relays: Vec<UserRelayRef>, | 28 | pub relays: Vec<UserRelayRef>, |
| 28 | pub created_at: u64, | 29 | pub created_at: Timestamp, |
| 29 | } | 30 | } |
| 30 | 31 | ||
| 31 | impl UserRelays { | 32 | impl UserRelays { |