File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -217,18 +217,17 @@ impl fmt::Display for ChannelReport {
217
217
218
218
pub mod channel_list {
219
219
use crate :: ValidatorId ;
220
- use chrono:: serde:: ts_seconds:: deserialize as ts_seconds;
221
- use chrono:: { DateTime , Utc } ;
220
+ use chrono:: { DateTime , Utc , serde:: ts_seconds} ;
222
221
use serde:: Deserialize ;
223
222
224
- #[ derive( Debug , Deserialize ) ]
223
+ #[ derive( Debug , Serialize , Deserialize ) ]
225
224
pub struct ChannelListQuery {
226
225
#[ serde( default = "default_page" ) ]
227
226
pub page : u64 ,
228
227
/// filters the list on `valid_until >= valid_until_ge`
229
228
/// It should be the same timestamp format as the `Channel.valid_until`: **seconds**
230
229
#[ serde(
231
- deserialize_with = "ts_seconds" ,
230
+ with = "ts_seconds" ,
232
231
default = "Utc::now" ,
233
232
rename = "validUntil"
234
233
) ]
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ impl Input {
83
83
"adSlot.hostname" => self
84
84
. ad_slot
85
85
. as_ref ( )
86
- . map ( |ad_slot| Value :: String ( ad_slot. hostname . clone ( ) . unwrap_or_default ( ) ) )
86
+ . map ( |ad_slot| Value :: String ( ad_slot. hostname . clone ( ) ) )
87
87
. ok_or ( Error :: UnknownVariable ) ,
88
88
"adSlot.alexaRank" => {
89
89
// @TODO: Decide how to handle Alexa rank values
@@ -137,7 +137,7 @@ pub struct Global {
137
137
#[ cfg_attr( test, derive( Default ) ) ]
138
138
pub struct AdSlot {
139
139
pub categories : Vec < String > ,
140
- pub hostname : Option < String > ,
140
+ pub hostname : String ,
141
141
pub alexa_rank : Option < f64 > ,
142
142
}
143
143
You can’t perform that action at this time.
0 commit comments