Implement inactivate device route for factory resets
All checks were successful
Build and Test / account (push) Successful in 5m54s
All checks were successful
Build and Test / account (push) Successful in 5m54s
This commit is contained in:
parent
65bef0d8f9
commit
559cb95ecb
2 changed files with 7 additions and 1 deletions
|
|
@ -134,6 +134,7 @@ async fn launch() -> _ {
|
||||||
.mount("/", routes![
|
.mount("/", routes![
|
||||||
conntest::conntest,
|
conntest::conntest,
|
||||||
nnid::devices::current_device_status,
|
nnid::devices::current_device_status,
|
||||||
|
nnid::devices::inactivate_device,
|
||||||
nnid::agreements::get_agreement,
|
nnid::agreements::get_agreement,
|
||||||
nnid::timezones::get_timezone,
|
nnid::timezones::get_timezone,
|
||||||
nnid::person_exists::person_exists,
|
nnid::person_exists::person_exists,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use rocket::get;
|
use rocket::{get, http::Status};
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use crate::xml::Xml;
|
use crate::xml::Xml;
|
||||||
|
|
||||||
|
|
@ -11,6 +11,11 @@ pub fn current_device_status() -> Xml<Device>{
|
||||||
Xml(Device)
|
Xml(Device)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[get("/v1/api/devices/@current/inactivate")]
|
||||||
|
pub fn inactivate_device() -> Status {
|
||||||
|
Status::Ok
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::nnid::devices::Device;
|
use crate::nnid::devices::Device;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue