♻️ refactor
Some checks failed
ci/woodpecker/push/build/1 Pipeline failed
ci/woodpecker/push/build/2 Pipeline failed

This commit is contained in:
JMARyA 2025-05-06 09:09:03 +02:00
parent b58ccf4af3
commit f904603a8d
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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