change get to post

This commit is contained in:
Timofey Gelazoniya 2023-07-13 16:30:19 +03:00
parent f9d736c0b5
commit 09ff721ba6
Signed by: zeldon
GPG Key ID: 047886915281DD2A
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ use axum::extract::Multipart;
use axum::http::StatusCode; use axum::http::StatusCode;
use axum::response::IntoResponse; use axum::response::IntoResponse;
use axum::response::Response; use axum::response::Response;
use axum::routing::get; use axum::routing::post;
use axum::Router; use axum::Router;
use magick_rust::magick_wand_genesis; use magick_rust::magick_wand_genesis;
use magick_rust::MagickWand; use magick_rust::MagickWand;
@ -39,7 +39,7 @@ async fn main() -> io::Result<()> {
))) )))
.serve( .serve(
Router::new() Router::new()
.route("/", get(handle_request)) .route("/", post(handle_request))
.layer(DefaultBodyLimit::disable()) .layer(DefaultBodyLimit::disable())
.layer(RequestBodyLimitLayer::new(10 * 1024 * 1024 /* 10mb */)) .layer(RequestBodyLimitLayer::new(10 * 1024 * 1024 /* 10mb */))
.layer(tower_http::trace::TraceLayer::new_for_http()) .layer(tower_http::trace::TraceLayer::new_for_http())