File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ impl StatusInfo {
9898 Ok ( rows)
9999 }
100100
101- async fn streak ( & self , ctx : & Context < ' _ > ) -> Result < Option < StatusUpdateStreakRecord > > {
101+ async fn streak ( & self , ctx : & Context < ' _ > ) -> Result < StatusUpdateStreakRecord > {
102102 let pool = ctx. data :: < Arc < PgPool > > ( ) . expect ( "Pool must be in context." ) ;
103103
104104 // The below is based on the classic 'islands and gaps' problem, adapted to fit our needs.
@@ -144,7 +144,7 @@ impl StatusInfo {
144144 . fetch_one ( pool. as_ref ( ) )
145145 . await ?;
146146
147- Ok ( Some ( result) )
147+ Ok ( result)
148148 }
149149
150150 async fn update_count (
Original file line number Diff line number Diff line change @@ -12,6 +12,6 @@ pub struct StatusUpdateRecord {
1212
1313#[ derive( SimpleObject , FromRow ) ]
1414pub struct StatusUpdateStreakRecord {
15- pub current_streak : i64 ,
16- pub max_streak : i64 ,
15+ pub current_streak : Option < i64 > ,
16+ pub max_streak : Option < i64 > ,
1717}
You can’t perform that action at this time.
0 commit comments