mirror of
https://github.com/house-of-vanity/khm.git
synced 2025-08-21 22:27:14 +00:00
Added web ui
This commit is contained in:
@@ -324,8 +324,15 @@ pub async fn run_server(args: crate::Args) -> std::io::Result<()> {
|
||||
.app_data(web::Data::new(flows.clone()))
|
||||
.app_data(web::Data::new(db_client.clone()))
|
||||
.app_data(allowed_flows.clone())
|
||||
// API routes
|
||||
.route("/api/flows", web::get().to(crate::web::get_flows_api))
|
||||
.route("/{flow_id}/keys/{server}", web::delete().to(crate::web::delete_key_by_server))
|
||||
// Original API routes
|
||||
.route("/{flow_id}/keys", web::get().to(get_keys))
|
||||
.route("/{flow_id}/keys", web::post().to(add_keys))
|
||||
// Web interface routes
|
||||
.route("/", web::get().to(crate::web::serve_web_interface))
|
||||
.route("/static/{filename:.*}", web::get().to(crate::web::serve_static_file))
|
||||
})
|
||||
.bind((args.ip.as_str(), args.port))?
|
||||
.run()
|
||||
|
Reference in New Issue
Block a user