Remove Stop and Rip commands
This commit is contained in:
parent
c85c4ee14b
commit
a50e0999ca
2 changed files with 0 additions and 18 deletions
|
|
@ -23,9 +23,7 @@ struct Server {
|
|||
|
||||
pub async fn run(tx: mpsc::Sender<Command>, addr: String) -> anyhow::Result<()> {
|
||||
let app = Router::new()
|
||||
.route("/stop", post(post_stop))
|
||||
.route("/test", post(post_test))
|
||||
.route("/rip", post(post_rip))
|
||||
.route("/text", post(post_text))
|
||||
.route("/image", post(post_image).fallback(get_static_file))
|
||||
.route("/photo", post(post_photo).fallback(get_static_file))
|
||||
|
|
@ -41,18 +39,10 @@ pub async fn run(tx: mpsc::Sender<Command>, addr: String) -> anyhow::Result<()>
|
|||
Ok(())
|
||||
}
|
||||
|
||||
async fn post_stop(server: State<Server>) {
|
||||
let _ = server.tx.send(Command::Stop).await;
|
||||
}
|
||||
|
||||
async fn post_test(server: State<Server>) {
|
||||
let _ = server.tx.send(Command::Test).await;
|
||||
}
|
||||
|
||||
async fn post_rip(server: State<Server>) {
|
||||
let _ = server.tx.send(Command::Rip).await;
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct PostTextForm {
|
||||
text: String,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue