-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from filecoin-project/get-rkh-notaries
Get rkh notaries
- Loading branch information
Showing
6 changed files
with
69 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
use actix_web::{get, HttpResponse}; | ||
use actix_web::{get, HttpResponse, Responder}; | ||
use fplus_lib::core::LDNApplication; | ||
|
||
#[get("/rkh")] | ||
pub async fn get() -> HttpResponse { | ||
HttpResponse::InternalServerError().finish() | ||
#[get("/rkhs")] | ||
pub async fn rkhs() -> actix_web::Result<impl Responder> { | ||
match LDNApplication::fetch_rkh().await { | ||
Ok(notaries) => { | ||
Ok(HttpResponse::Ok().json(notaries)) | ||
} | ||
Err(e) => { | ||
Ok(HttpResponse::InternalServerError().body(e.to_string())) | ||
} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters