Delete unused login.do POST page

O01eg
Jan 25, 2022, 1:50 PM
DESUWE7PDNT34AEK5PDNELQJ2UV5UPCJNZWU3UE2V5WEXZQAI7MAC

Dependencies

  • [2] 7R6HAATP Optional publish static files if use reverse-proxy
  • [3] 4MZ4VIR7 Initial commit
  • [4] QPHRMBEP Get "Real IP" for proxied build
  • [5] BCXEUKX6 Add config, static files and web server
  • [6] 65A3LIWU Use handlebars to render index
  • [7] OJO4B4QO Add login form and empty handler
  • [8] IM5ZPD4N Update dependencies

Change contents

  • file deletion: login.rs (-xw-x--x--)login.rs (----------)
    [3.6][3.235:245](),[3.245][3.246:246](),[3.6][3.1210:1229](),[3.1229][3.246:246]()
    use serde_derive::{Deserialize, Serialize};
    use actix_web::http::header;
    use actix_web::{web, HttpResponse};
    #[derive(Serialize, Deserialize)]
    pub struct LoginParams {
    login: String,
    password: String,
    }
    pub async fn login_post(_params: web::Form<LoginParams>) -> HttpResponse {
    HttpResponse::Found()
    .append_header((header::LOCATION, "index.html"))
    .finish()
    }
  • edit in src/main.rs at line 10
    [3.110][3.110:111](),[3.111][3.53:94]()
    mod login;
    use crate::login::login_post;
  • replacement in src/main.rs at line 62
    [3.647][3.647:703](),[3.703][2.177:261]()
    .route("/index.html", web::get().to(index))
    .service(web::resource("/login.do").route(web::post().to(login_post)));
    [3.647]
    [2.261]
    .route("/index.html", web::get().to(index));