Merge pull request 'chore: update deps' (#43) from chore-update-deps into master
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #43
This commit is contained in:
commit
2017ec294a
4 changed files with 419 additions and 384 deletions
|
@ -1,6 +1,6 @@
|
||||||
pipeline:
|
steps:
|
||||||
backend:
|
backend:
|
||||||
image: rust
|
image: rust:1.79-bullseye
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgres://postgres:password@database:5432/postgres
|
- DATABASE_URL=postgres://postgres:password@database:5432/postgres
|
||||||
commands:
|
commands:
|
||||||
|
@ -20,6 +20,7 @@ pipeline:
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
when:
|
when:
|
||||||
event: [push, tag, deployment]
|
event: [push, tag, deployment]
|
||||||
|
branch: master
|
||||||
settings:
|
settings:
|
||||||
username: realaravinth
|
username: realaravinth
|
||||||
password:
|
password:
|
||||||
|
|
782
Cargo.lock
generated
782
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
10
Cargo.toml
10
Cargo.toml
|
@ -12,9 +12,9 @@ build = "build.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-files = "0.6.2"
|
actix-files = "0.6.2"
|
||||||
actix-multipart = "0.6"
|
actix-multipart = "0.7"
|
||||||
actix-web = "4"
|
actix-web = "4"
|
||||||
actix-web-httpauth = "0.8.0"
|
actix-web-httpauth = "0.8.2"
|
||||||
futures-util = { version = "0.3.17", default-features = false, features = ["std"] }
|
futures-util = { version = "0.3.17", default-features = false, features = ["std"] }
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
log = "0.4.17"
|
log = "0.4.17"
|
||||||
|
@ -24,9 +24,9 @@ serde = { version = "1", features=["derive"]}
|
||||||
tokio = { version = "1.32", features = ["fs"]}
|
tokio = { version = "1.32", features = ["fs"]}
|
||||||
uuid = { version = "1", features = ["v4"] }
|
uuid = { version = "1", features = ["v4"] }
|
||||||
sqlx = { version = "0.5.13", features = [ "runtime-actix-rustls", "postgres", "time", "offline" ] }
|
sqlx = { version = "0.5.13", features = [ "runtime-actix-rustls", "postgres", "time", "offline" ] }
|
||||||
actix-web-codegen-const-routes = { version = "0.1.0", tag = "0.1.0", git = "https://github.com/realaravinth/actix-web-codegen-const-routes" }
|
actix-web-codegen-const-routes = "0.2.0"
|
||||||
derive_builder = "0.20"
|
derive_builder = "0.20"
|
||||||
argon2-creds = { branch = "master", git = "https://github.com/realaravinth/argon2-creds"}
|
argon2-creds = "0.2.3"
|
||||||
config = "0.11"
|
config = "0.11"
|
||||||
derive_more = "0.99.17"
|
derive_more = "0.99.17"
|
||||||
url = { version = "2.2.2", features = ["serde"]}
|
url = { version = "2.2.2", features = ["serde"]}
|
||||||
|
@ -41,4 +41,4 @@ sqlx = { version = "0.5.13", features = [ "runtime-actix-rustls", "postgres", "t
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-rt = "2.7.0"
|
actix-rt = "2.7.0"
|
||||||
base64 = "0.21.0"
|
base64 = "0.22.0"
|
||||||
|
|
|
@ -41,16 +41,16 @@ pub mod routes {
|
||||||
Self {
|
Self {
|
||||||
delete_dir: "/api/v1/files/delete",
|
delete_dir: "/api/v1/files/delete",
|
||||||
upload_file: "/api/v1/files/upload",
|
upload_file: "/api/v1/files/upload",
|
||||||
index: "/api/v1/files/",
|
index: "/api/v1/files/index",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn services(cfg: &mut web::ServiceConfig) {
|
pub fn services(cfg: &mut web::ServiceConfig) {
|
||||||
|
cfg.service(index);
|
||||||
cfg.service(delete_dir);
|
cfg.service(delete_dir);
|
||||||
cfg.service(upload_file);
|
cfg.service(upload_file);
|
||||||
cfg.service(index);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Deserialize, Serialize)]
|
#[derive(Debug, Eq, PartialEq, Deserialize, Serialize)]
|
||||||
|
@ -107,7 +107,7 @@ async fn upload_file(
|
||||||
// iterate over multipart stream
|
// iterate over multipart stream
|
||||||
while let Some(mut field) = payload.try_next().await? {
|
while let Some(mut field) = payload.try_next().await? {
|
||||||
// A multipart/form-data stream has to contain `content_disposition`
|
// A multipart/form-data stream has to contain `content_disposition`
|
||||||
let content_disposition = field.content_disposition();
|
let content_disposition = field.content_disposition().unwrap();
|
||||||
|
|
||||||
let filename = content_disposition.get_filename();
|
let filename = content_disposition.get_filename();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue