Implement inactivate device route for factory resets
All checks were successful
Build and Test / account (push) Successful in 5m54s

This commit is contained in:
red binder 2026-04-26 19:47:02 +02:00
commit 559cb95ecb
2 changed files with 7 additions and 1 deletions

View file

@ -134,6 +134,7 @@ async fn launch() -> _ {
.mount("/", routes![
conntest::conntest,
nnid::devices::current_device_status,
nnid::devices::inactivate_device,
nnid::agreements::get_agreement,
nnid::timezones::get_timezone,
nnid::person_exists::person_exists,

View file

@ -1,4 +1,4 @@
use rocket::get;
use rocket::{get, http::Status};
use serde::Serialize;
use crate::xml::Xml;
@ -11,6 +11,11 @@ pub fn current_device_status() -> Xml<Device>{
Xml(Device)
}
#[get("/v1/api/devices/@current/inactivate")]
pub fn inactivate_device() -> Status {
Status::Ok
}
#[cfg(test)]
mod tests {
use crate::nnid::devices::Device;