♻️ refactor
This commit is contained in:
parent
b58ccf4af3
commit
f904603a8d
2 changed files with 2 additions and 2 deletions
|
@ -68,7 +68,7 @@ async fn main() {
|
|||
let user = Router::new()
|
||||
.route("/login", post(login_user))
|
||||
.route("/device/{device_id}", get(device_get_api))
|
||||
// .route("/device/{device_id}/shell", post(device_shell_cmd))
|
||||
.route("/device/{device_id}/shell", post(device_shell_cmd))
|
||||
.route("/devices", get(devices_list));
|
||||
|
||||
let app = Router::new().merge(device).merge(user);
|
||||
|
|
|
@ -32,8 +32,8 @@ use super::mqtt::send_msg;
|
|||
|
||||
pub async fn device_shell_cmd(
|
||||
Path(device_id): Path<String>,
|
||||
TypedHeader(session): TypedHeader<Authorization<Bearer>>,
|
||||
Json(payload): Json<api::ShellParam>,
|
||||
session: TypedHeader<Authorization<Bearer>>,
|
||||
) -> (StatusCode, Json<api::Result<ShellResponse>>) {
|
||||
// TODO : check auth
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue