Skip to content

Commit

Permalink
Changes after CR
Browse files Browse the repository at this point in the history
  • Loading branch information
filip-neti committed Nov 15, 2024
1 parent 49a3975 commit 218479c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions fplus-http-server/src/router/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub async fn propose(
)
.await
{
Ok(_) => HttpResponse::Ok().body(serde_json::to_string_pretty("Success").unwrap()),
Ok(app) => HttpResponse::Ok().body(serde_json::to_string_pretty(&app).unwrap()),
Err(e) => HttpResponse::BadRequest().body(e.to_string()),
}
}
Expand Down Expand Up @@ -241,7 +241,7 @@ pub async fn approve(
)
.await
{
Ok(_) => HttpResponse::Ok().body(serde_json::to_string_pretty("Success").unwrap()),
Ok(app) => HttpResponse::Ok().body(serde_json::to_string_pretty(&app).unwrap()),
Err(e) => HttpResponse::BadRequest().body(e.to_string()),
}
}
Expand Down
8 changes: 4 additions & 4 deletions fplus-lib/src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ impl LDNApplication {
owner: String,
repo: String,
new_allocation_amount: Option<String>,
) -> Result<(), LDNError> {
) -> Result<ApplicationFile, LDNError> {
// TODO: Convert DB errors to LDN Error
// Get multisig threshold from the database
let db_allocator = match get_allocator(&owner, &repo).await {
Expand Down Expand Up @@ -1172,7 +1172,7 @@ impl LDNApplication {
}
Err(e) => log::warn!("Failed to get pull request by head: {}", e),
};
Ok(())
Ok(app_file)
}
None => Err(LDNError::New(format!(
"Application issue {} cannot be proposed(1)",
Expand Down Expand Up @@ -1415,7 +1415,7 @@ impl LDNApplication {
owner: String,
repo: String,
new_allocation_amount: Option<String>,
) -> Result<(), LDNError> {
) -> Result<ApplicationFile, LDNError> {
// Get multisig threshold from the database
let db_allocator = match get_allocator(&owner, &repo).await {
Ok(allocator) => allocator.unwrap(),
Expand Down Expand Up @@ -1519,7 +1519,7 @@ impl LDNApplication {

self.issue_updates(&app_file.issue_number, comment, label)
.await?;
Ok(())
Ok(app_file)
}

async fn parse_application_issue(
Expand Down

0 comments on commit 218479c

Please sign in to comment.