Added rustfmt config & ran formatter
This commit is contained in:
parent
8664453ef7
commit
f77be877db
5 changed files with 87 additions and 13 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use crate::STATIC_DIR_NAME;
|
||||
use std::{collections::HashSet, io::ErrorKind, path::Path};
|
||||
|
||||
use axum::{
|
||||
extract::{BodyStream, Extension},
|
||||
http::StatusCode,
|
||||
|
|
@ -6,16 +7,16 @@ use axum::{
|
|||
};
|
||||
use flate2::read::GzDecoder;
|
||||
use futures_util::TryStreamExt;
|
||||
use std::collections::HashSet;
|
||||
use std::io::ErrorKind;
|
||||
use std::path::Path;
|
||||
use tar::Archive;
|
||||
use tokio_util::io::StreamReader;
|
||||
|
||||
use crate::STATIC_DIR_NAME;
|
||||
|
||||
pub async fn post_deploy(
|
||||
Extension(data_dir): Extension<String>,
|
||||
res: BodyStream,
|
||||
) -> impl IntoResponse {
|
||||
) -> impl IntoResponse
|
||||
{
|
||||
// This converts a stream into something that implements AsyncRead, which we can then use to
|
||||
// asynchronously write the file to disk
|
||||
let mut read =
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use axum::routing::post;
|
||||
use axum::Router;
|
||||
use axum::{routing::post, Router};
|
||||
|
||||
mod deploy;
|
||||
|
||||
pub fn router() -> Router {
|
||||
pub fn router() -> Router
|
||||
{
|
||||
Router::new().route("/deploy", post(deploy::post_deploy))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue