Skip to content

Commit d0f70fc

Browse files
authored
Merge pull request #326 from AdExNetwork/serde_fixes
Removed unused fields + changed DateTime deserialization
2 parents 7dc3598 + 1b0d98c commit d0f70fc

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

primitives/src/ad_slot.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use crate::{BigNum, TargetingTag, ValidatorId, targeting::Rule};
2-
use chrono::serde::{ts_milliseconds, ts_milliseconds_option};
32
use chrono::{DateTime, Utc};
43
use serde::{Deserialize, Serialize};
54
use std::collections::HashMap;
@@ -22,16 +21,6 @@ pub struct AdSlot {
2221
/// see IAB ad unit guidelines and iab_flex_{adUnitName} (see IAB's new ad portfolio and PDF)
2322
#[serde(rename = "type")]
2423
pub ad_type: String,
25-
/// A URL to the resource (usually PNG)
26-
/// * must use the ipfs:// protocol, to guarantee data immutability
27-
pub media_url: String,
28-
/// MIME type of the media.
29-
// Possible values at the moment are:
30-
/// * image/jpeg
31-
/// * image/png
32-
pub media_mime: String,
33-
/// Advertised URL
34-
pub target_url: String,
3524
/// Array of TargetingTag
3625
#[serde(default)]
3726
pub targeting: Vec<TargetingTag>,
@@ -53,7 +42,6 @@ pub struct AdSlot {
5342
/// User address from the session
5443
pub owner: ValidatorId,
5544
/// UTC timestamp in milliseconds, used as nonce for escaping duplicated spec ipfs hashes
56-
#[serde(with = "ts_milliseconds")]
5745
pub created: DateTime<Utc>,
5846
/// the name of the unit used in platform UI
5947
#[serde(default)]
@@ -67,6 +55,5 @@ pub struct AdSlot {
6755
#[serde(default)]
6856
pub archived: bool,
6957
/// UTC timestamp in milliseconds, changed every time modifiable property is changed
70-
#[serde(default, with = "ts_milliseconds_option")]
7158
pub modified: Option<DateTime<Utc>>,
7259
}

0 commit comments

Comments
 (0)