Skip to content

Commit

Permalink
Merge pull request #56 from InfoHunter/enhance
Browse files Browse the repository at this point in the history
Make several paths POST-able
  • Loading branch information
wa5i authored May 6, 2024
2 parents 1a37be8 + d18158a commit 361e68d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/http/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,20 @@ pub fn init_sys_service(cfg: &mut web::ServiceConfig) {
.service(
web::resource("/init")
.route(web::get().to(sys_init_get_request_handler))
.route(web::post().to(sys_init_put_request_handler))
.route(web::put().to(sys_init_put_request_handler)),
)
.service(web::resource("/seal-status").route(web::get().to(sys_seal_status_request_handler)))
.service(web::resource("/seal").route(web::put().to(sys_seal_request_handler)))
.service(web::resource("/unseal").route(web::put().to(sys_unseal_request_handler)))
.service(
web::resource("/seal")
.route(web::post().to(sys_seal_request_handler))
.route(web::put().to(sys_seal_request_handler)),
)
.service(
web::resource("/unseal")
.route(web::post().to(sys_unseal_request_handler))
.route(web::put().to(sys_unseal_request_handler)),
)
.service(web::resource("/mounts").route(web::get().to(sys_list_mounts_request_handler)))
.service(
web::resource("/mounts/{path:.*}")
Expand Down

0 comments on commit 361e68d

Please sign in to comment.