From 358a0893798efc4c019a281c6b24748a2191a77a Mon Sep 17 00:00:00 2001 From: Kilerd Chan Date: Wed, 24 Apr 2019 10:02:25 +0800 Subject: [PATCH 1/2] fix: render html for analytics --- templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ From 7169c6bf76cc5b2e65439024587fad6df6aee024 Mon Sep 17 00:00:00 2001 From: Kilerd Chan Date: Sun, 28 Apr 2019 15:16:17 +0800 Subject: [PATCH 2/2] fix: larger the limit size of submitting form --- src/main.rs | 8 +++++++- src/routers/admin.rs | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) 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,