File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
fplus-http-server/src/router Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -134,18 +134,18 @@ pub async fn merged(query: web::Query<GithubQueryParams>) -> actix_web::Result<i
134
134
}
135
135
}
136
136
137
- #[ post( "/application/{id}/ refill" ) ]
137
+ #[ post( "/application/refill" ) ]
138
138
pub async fn refill ( data : web:: Json < RefillInfo > ) -> actix_web:: Result < impl Responder > {
139
139
match LDNApplication :: refill ( data. into_inner ( ) ) . await {
140
140
Ok ( applications) => Ok ( HttpResponse :: Ok ( ) . json ( applications) ) ,
141
141
Err ( e) => Ok ( HttpResponse :: BadRequest ( ) . body ( e. to_string ( ) ) ) ,
142
142
}
143
143
}
144
144
145
- #[ post( "/application/{id}/ totaldcreached" ) ]
146
- pub async fn total_dc_reached ( id : web :: Path < String > , data : web:: Json < DcReachedInfo > ) -> actix_web:: Result < impl Responder > {
147
- let DcReachedInfo { owner, repo} = data. into_inner ( ) ;
148
- match LDNApplication :: total_dc_reached ( id. into_inner ( ) , owner, repo) . await {
145
+ #[ post( "/application/totaldcreached" ) ]
146
+ pub async fn total_dc_reached ( data : web:: Json < DcReachedInfo > ) -> actix_web:: Result < impl Responder > {
147
+ let DcReachedInfo { id , owner, repo} = data. into_inner ( ) ;
148
+ match LDNApplication :: total_dc_reached ( id, owner, repo) . await {
149
149
Ok ( applications) => Ok ( HttpResponse :: Ok ( ) . json ( applications) ) ,
150
150
Err ( e) => Ok ( HttpResponse :: BadRequest ( ) . body ( e. to_string ( ) ) ) ,
151
151
}
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ pub struct RefillInfo {
73
73
74
74
#[ derive( Deserialize ) ]
75
75
pub struct DcReachedInfo {
76
+ pub id : String ,
76
77
pub owner : String ,
77
78
pub repo : String
78
79
}
You can’t perform that action at this time.
0 commit comments