remote_backend/src
remote_frontend/src
@ -12,7 +12,8 @@ use light_openid::basic_state_manager::BasicStateManager;
|
||||
use remote_backend::app_config::AppConfig;
|
||||
use remote_backend::constants;
|
||||
use remote_backend::controllers::{
|
||||
auth_controller, server_controller, static_controller, sys_info_controller, vm_controller,
|
||||
auth_controller, group_controller, server_controller, static_controller, sys_info_controller,
|
||||
vm_controller,
|
||||
};
|
||||
use remote_backend::middlewares::auth_middleware::AuthChecker;
|
||||
use std::time::Duration;
|
||||
@ -86,6 +87,39 @@ async fn main() -> std::io::Result<()> {
|
||||
"/api/server/rights",
|
||||
web::get().to(server_controller::rights),
|
||||
)
|
||||
// Groups routes
|
||||
.route(
|
||||
"/api/group/{gid}/vm/state",
|
||||
web::get().to(group_controller::vm_state),
|
||||
)
|
||||
.route(
|
||||
"/api/group/{gid}/vm/start",
|
||||
web::get().to(group_controller::vm_start),
|
||||
)
|
||||
.route(
|
||||
"/api/group/{gid}/vm/shutdown",
|
||||
web::get().to(group_controller::vm_shutdown),
|
||||
)
|
||||
.route(
|
||||
"/api/group/{gid}/vm/kill",
|
||||
web::get().to(group_controller::vm_kill),
|
||||
)
|
||||
.route(
|
||||
"/api/group/{gid}/vm/reset",
|
||||
web::get().to(group_controller::vm_reset),
|
||||
)
|
||||
.route(
|
||||
"/api/group/{gid}/vm/suspend",
|
||||
web::get().to(group_controller::vm_suspend),
|
||||
)
|
||||
.route(
|
||||
"/api/group/{gid}/vm/resume",
|
||||
web::get().to(group_controller::vm_resume),
|
||||
)
|
||||
.route(
|
||||
"/api/group/{gid}/vm/screenshot",
|
||||
web::get().to(group_controller::vm_screenshot),
|
||||
)
|
||||
// VM routes
|
||||
.route("/api/vm/{uid}/state", web::get().to(vm_controller::state))
|
||||
.route("/api/vm/{uid}/start", web::get().to(vm_controller::start))
|
||||
|
Reference in New Issue
Block a user