Skip to content

Commit c086314

Browse files
authored
Merge pull request #127 from filecoin-project/feat/adapt-endpoints-to-ssa-bot
Feat/adapt-endpoints-to-ssa-bot
2 parents 58372d7 + 95cd11c commit c086314

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

fplus-http-server/src/router/application.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,18 +134,18 @@ pub async fn merged(query: web::Query<GithubQueryParams>) -> actix_web::Result<i
134134
}
135135
}
136136

137-
#[post("/application/{id}/refill")]
137+
#[post("/application/refill")]
138138
pub async fn refill(data: web::Json<RefillInfo>) -> actix_web::Result<impl Responder> {
139139
match LDNApplication::refill(data.into_inner()).await {
140140
Ok(applications) => Ok(HttpResponse::Ok().json(applications)),
141141
Err(e) => Ok(HttpResponse::BadRequest().body(e.to_string())),
142142
}
143143
}
144144

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 {
149149
Ok(applications) => Ok(HttpResponse::Ok().json(applications)),
150150
Err(e) => Ok(HttpResponse::BadRequest().body(e.to_string())),
151151
}

fplus-lib/src/core/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ pub struct RefillInfo {
7373

7474
#[derive(Deserialize)]
7575
pub struct DcReachedInfo {
76+
pub id: String,
7677
pub owner: String,
7778
pub repo: String
7879
}

0 commit comments

Comments
 (0)