Skip to content

Commit fdd82d8

Browse files
committed
Chore: upgrade dependencies
1 parent 691124d commit fdd82d8

13 files changed

Lines changed: 750 additions & 779 deletions

File tree

Cargo.lock

Lines changed: 721 additions & 749 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ publish = false
99
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1010

1111
[dependencies]
12-
actix-web = "4.0.0-beta.9"
13-
actix-http = "3.0.0-beta.9"
12+
actix-web = "4.1"
13+
actix-http = "3.2"
1414
arc-swap = "1.5"
1515
futures = "0.3"
1616
anyhow = "1.0"
@@ -19,24 +19,24 @@ pretty_env_logger = "0.4"
1919
dotenv = "0.15"
2020
once_cell = "1.8"
2121
serde = "1.0"
22-
uuid = { version = "0.8", features = ["serde"] }
22+
uuid = { version = "1.1", features = ["serde"] }
2323
chrono = { version = "0.4", features = ["serde"] }
2424
bitflags = "1.3"
2525
tokio = "1.12"
2626
reqwest = { version = "0.11", features = ["json"] }
27-
scraper = "0.12"
27+
scraper = "0.13"
2828
ego-tree = "0.6"
2929
regex = "1.5"
3030
const_format = "0.2"
3131
chrono-tz = "0.6"
32-
ilyvion-util = { version = "0.6", features = ["chrono"] }
32+
ilyvion-util = { version = "0.8", features = ["chrono"] }
3333
actix-web-grants = "3.0.0-beta.3"
3434
serde_json = "1.0"
3535
actix-multipart = "0.4.0-beta.6"
3636
crc32c = "0.6"
3737
actix-files = "0.6.0-beta.7"
38-
semval = "0.1"
39-
parse-display = "0.5"
38+
semval = "0.4"
39+
parse-display = "0.6"
4040
rand = "0.8"
4141
shared = { path = "./shared" }
4242
database = { path = "./database" }

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ FROM debian:bullseye-slim AS binary
5656

5757
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
5858
ca-certificates
59+
RUN apt-get clean
5960

6061
COPY --from=build /usr/src/qcext-server/target/release/qcext-server /usr/local/bin/
6162
COPY --from=build /usr/src/qcext-server/build /build
6263

6364
ENV RUST_LOG=info
64-
CMD qcext-server
65+
CMD ["/usr/local/bin/qcext-server"]

src/controllers/api/comic/add_item.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use anyhow::anyhow;
66
use database::models::{Comic as DatabaseComic, Item as DatabaseItem, LogEntry, Occurrence};
77
use database::DbPool;
88
use parse_display::Display;
9-
use semval::{context::Context as ValidationContext, Result as ValidationResult, Validate};
9+
use semval::{context::Context as ValidationContext, Validate};
1010
use serde::Deserialize;
1111
use shared::token_permissions;
1212

@@ -138,7 +138,7 @@ pub(crate) struct AddItemToComicBody {
138138

139139
impl Validate for AddItemToComicBody {
140140
type Invalidity = AddItemToComicBodyInvalidity;
141-
fn validate(&self) -> ValidationResult<Self::Invalidity> {
141+
fn validate(&self) -> semval::ValidationResult<Self::Invalidity> {
142142
ValidationContext::new()
143143
.validate_with(&self.comic_id, AddItemToComicBodyInvalidity::ComicId)
144144
.invalidate_if(

src/controllers/api/comic/remove_item.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use database::models::{
88
};
99
use database::DbPool;
1010
use parse_display::Display;
11-
use semval::{context::Context as ValidationContext, Result as ValidationResult, Validate};
11+
use semval::{context::Context as ValidationContext, Validate};
1212
use serde::Deserialize;
1313
use shared::token_permissions;
1414

@@ -84,7 +84,7 @@ pub(crate) struct RemoveItemFromComicBody {
8484
impl Validate for RemoveItemFromComicBody {
8585
type Invalidity = RemoveItemFromComicBodyInvalidity;
8686

87-
fn validate(&self) -> ValidationResult<Self::Invalidity> {
87+
fn validate(&self) -> semval::ValidationResult<Self::Invalidity> {
8888
ValidationContext::new()
8989
.validate_with(&self.comic_id, RemoveItemFromComicBodyInvalidity::ComicId)
9090
.validate_with(&self.item_id, RemoveItemFromComicBodyInvalidity::ItemId)

src/controllers/api/comic/set_flags.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ pub(crate) struct SetFlagBody {
220220
impl Validate for SetFlagBody {
221221
type Invalidity = SetFlagBodyInvalidity;
222222

223-
fn validate(&self) -> semval::Result<Self::Invalidity> {
223+
fn validate(&self) -> semval::ValidationResult<Self::Invalidity> {
224224
ValidationContext::new()
225225
.validate_with(&self.comic_id, SetFlagBodyInvalidity::ComicId)
226226
.into()

src/controllers/api/comic/set_publish_date.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub(crate) struct SetPublishDateBody {
9595
impl Validate for SetPublishDateBody {
9696
type Invalidity = SetPublishDateBodyInvalidity;
9797

98-
fn validate(&self) -> semval::Result<Self::Invalidity> {
98+
fn validate(&self) -> semval::ValidationResult<Self::Invalidity> {
9999
ValidationContext::new()
100100
.validate_with(&self.comic_id, SetPublishDateBodyInvalidity::ComicId)
101101
.invalidate_if(

src/controllers/api/comic/set_tagline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub(crate) struct SetTaglineBody {
8787
impl Validate for SetTaglineBody {
8888
type Invalidity = SetTaglineBodyInvalidity;
8989

90-
fn validate(&self) -> semval::Result<Self::Invalidity> {
90+
fn validate(&self) -> semval::ValidationResult<Self::Invalidity> {
9191
ValidationContext::new()
9292
.validate_with(&self.comic_id, SetTaglineBodyInvalidity::ComicId)
9393
.into()

src/controllers/api/comic/set_title.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub(crate) struct SetTitleBody {
8484
impl Validate for SetTitleBody {
8585
type Invalidity = SetTitleBodyInvalidity;
8686

87-
fn validate(&self) -> semval::Result<Self::Invalidity> {
87+
fn validate(&self) -> semval::ValidationResult<Self::Invalidity> {
8888
ValidationContext::new()
8989
.validate_with(&self.comic_id, SetTitleBodyInvalidity::ComicId)
9090
.into()

src/controllers/api/item/image_upload.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ pub(crate) async fn image_upload(
2323
while let Some(item) = image_upload_form.next().await {
2424
let mut field = item.map_err(error::ErrorBadRequest)?;
2525

26-
let content_disposition = field.content_disposition().ok_or_else(|| {
27-
error::ErrorBadRequest(anyhow!("Content-Disposition header was missing"))
28-
})?;
26+
let content_disposition = field.content_disposition();
2927
let name = content_disposition
3028
.get_name()
3129
.ok_or_else(|| error::ErrorBadRequest(anyhow!("A form field was missing a name")))?;

0 commit comments

Comments
 (0)