diff --git a/src/main.rs b/src/main.rs index 534b3b3..fa54bcd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,7 +73,13 @@ fn main() { .service(routers::admin::admin_login) .service(routers::admin::admin_authentication) .service(routers::admin::article_creation) - .service(routers::admin::article_save) + .service( + web::resource("/article").route( + web::post() + .data(web::FormConfig::default().limit(256_000)) + .to(routers::admin::article_save), + ), + ) .service(routers::admin::article_edit) .service(routers::admin::article_deletion) .service(routers::admin::change_password) diff --git a/src/routers/admin.rs b/src/routers/admin.rs index e9c0d26..debf767 100644 --- a/src/routers/admin.rs +++ b/src/routers/admin.rs @@ -129,7 +129,6 @@ pub fn article_edit( } } -#[post("/article")] pub fn article_save( id: Identity, article: Form, diff --git a/templates/base.html b/templates/base.html index de01238..e89113f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -14,7 +14,7 @@