This commit is contained in:
2023-09-14 21:57:12 +02:00
parent 0627557c6d
commit 6a1b8a7191
3 changed files with 43 additions and 55 deletions

80
Cargo.lock generated
View File

@@ -388,18 +388,17 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "chrono" name = "chrono"
version = "0.4.26" version = "0.4.30"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" checksum = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877"
dependencies = [ dependencies = [
"android-tzdata", "android-tzdata",
"iana-time-zone", "iana-time-zone",
"js-sys", "js-sys",
"num-traits", "num-traits",
"serde", "serde",
"time 0.1.45",
"wasm-bindgen", "wasm-bindgen",
"winapi", "windows-targets",
] ]
[[package]] [[package]]
@@ -1586,9 +1585,9 @@ dependencies = [
[[package]] [[package]]
name = "meilisearch-index-setting-macro" name = "meilisearch-index-setting-macro"
version = "0.24.1" version = "0.24.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "923bb7380030676cfd6563bc09cf88f7150fab55fc881c44e86f4a10c9b7ae2a" checksum = "b6e019768c1720f9820e94e8ec527e492be150eb0a5deeec28d85af7a5bbbe6a"
dependencies = [ dependencies = [
"convert_case 0.6.0", "convert_case 0.6.0",
"proc-macro2", "proc-macro2",
@@ -1598,9 +1597,9 @@ dependencies = [
[[package]] [[package]]
name = "meilisearch-sdk" name = "meilisearch-sdk"
version = "0.24.1" version = "0.24.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff38036cb0ce16609896d1fd90fbce9432a173c744abd3a0d8daf2e4cdbb0d65" checksum = "639a940bc77db5398000cb184c543106a823677f474f2f195251d2bdd373b6de"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"either", "either",
@@ -1615,7 +1614,7 @@ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"thiserror", "thiserror",
"time 0.3.25", "time",
"uuid", "uuid",
"wasm-bindgen", "wasm-bindgen",
"wasm-bindgen-futures", "wasm-bindgen-futures",
@@ -3050,9 +3049,9 @@ checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918"
[[package]] [[package]]
name = "sentry" name = "sentry"
version = "0.31.5" version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01b0ad16faa5d12372f914ed40d00bda21a6d1bdcc99264c5e5e1c9495cf3654" checksum = "0097a48cd1999d983909f07cb03b15241c5af29e5e679379efac1c06296abecc"
dependencies = [ dependencies = [
"httpdate", "httpdate",
"native-tls", "native-tls",
@@ -3069,9 +3068,9 @@ dependencies = [
[[package]] [[package]]
name = "sentry-backtrace" name = "sentry-backtrace"
version = "0.31.5" version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11f2ee8f147bb5f22ac59b5c35754a759b9a6f6722402e2a14750b2a63fc59bd" checksum = "18a7b80fa1dd6830a348d38a8d3a9761179047757b7dca29aef82db0118b9670"
dependencies = [ dependencies = [
"backtrace", "backtrace",
"once_cell", "once_cell",
@@ -3081,9 +3080,9 @@ dependencies = [
[[package]] [[package]]
name = "sentry-contexts" name = "sentry-contexts"
version = "0.31.5" version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcd133362c745151eeba0ac61e3ba8350f034e9fe7509877d08059fe1d7720c6" checksum = "7615dc588930f1fd2e721774f25844ae93add2dbe2d3c2f995ce5049af898147"
dependencies = [ dependencies = [
"hostname", "hostname",
"libc", "libc",
@@ -3095,9 +3094,9 @@ dependencies = [
[[package]] [[package]]
name = "sentry-core" name = "sentry-core"
version = "0.31.5" version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7163491708804a74446642ff2c80b3acd668d4b9e9f497f85621f3d250fd012b" checksum = "8f51264e4013ed9b16558cce43917b983fa38170de2ca480349ceb57d71d6053"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"rand 0.8.5", "rand 0.8.5",
@@ -3108,9 +3107,9 @@ dependencies = [
[[package]] [[package]]
name = "sentry-debug-images" name = "sentry-debug-images"
version = "0.31.5" version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a5003d7ff08aa3b2b76994080b183e8cfa06c083e280737c9cee02ca1c70f5e" checksum = "2fe6180fa564d40bb942c9f0084ffb5de691c7357ead6a2b7a3154fae9e401dd"
dependencies = [ dependencies = [
"findshlibs", "findshlibs",
"once_cell", "once_cell",
@@ -3119,9 +3118,9 @@ dependencies = [
[[package]] [[package]]
name = "sentry-panic" name = "sentry-panic"
version = "0.31.5" version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4dfe8371c9b2e126a8b64f6fefa54cef716ff2a50e63b5558a48b899265bccd" checksum = "323160213bba549f9737317b152af116af35c0410f4468772ee9b606d3d6e0fa"
dependencies = [ dependencies = [
"sentry-backtrace", "sentry-backtrace",
"sentry-core", "sentry-core",
@@ -3129,9 +3128,9 @@ dependencies = [
[[package]] [[package]]
name = "sentry-tracing" name = "sentry-tracing"
version = "0.31.5" version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5aca8b88978677a27ee1a91beafe4052306c474c06f582321fde72d2e2cc2f7f" checksum = "38033822128e73f7b6ca74c1631cef8868890c6cb4008a291cf73530f87b4eac"
dependencies = [ dependencies = [
"sentry-backtrace", "sentry-backtrace",
"sentry-core", "sentry-core",
@@ -3141,26 +3140,26 @@ dependencies = [
[[package]] [[package]]
name = "sentry-types" name = "sentry-types"
version = "0.31.5" version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e7a88e0c1922d19b3efee12a8215f6a8a806e442e665ada71cc222cab72985f" checksum = "0e663b3eb62ddfc023c9cf5432daf5f1a4f6acb1df4d78dd80b740b32dd1a740"
dependencies = [ dependencies = [
"debugid", "debugid",
"getrandom 0.2.10",
"hex", "hex",
"rand 0.8.5",
"serde", "serde",
"serde_json", "serde_json",
"thiserror", "thiserror",
"time 0.3.25", "time",
"url", "url",
"uuid", "uuid",
] ]
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.183" version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
@@ -3177,9 +3176,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.183" version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -3583,17 +3582,6 @@ dependencies = [
"once_cell", "once_cell",
] ]
[[package]]
name = "time"
version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
dependencies = [
"libc",
"wasi 0.10.0+wasi-snapshot-preview1",
"winapi",
]
[[package]] [[package]]
name = "time" name = "time"
version = "0.3.25" version = "0.3.25"
@@ -3639,9 +3627,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.31.0" version = "1.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40de3a2ba249dcb097e01be5e67a5ff53cf250397715a071a81543e8a832a920" checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9"
dependencies = [ dependencies = [
"backtrace", "backtrace",
"bytes", "bytes",
@@ -3741,9 +3729,9 @@ dependencies = [
[[package]] [[package]]
name = "tower-http" name = "tower-http"
version = "0.4.3" version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140"
dependencies = [ dependencies = [
"bitflags 2.4.0", "bitflags 2.4.0",
"bytes", "bytes",

View File

@@ -15,21 +15,21 @@ once_cell = "1.18.0"
prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust", tag = "0.6.9", default-features = false, features = ["postgresql"] } prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust", tag = "0.6.9", default-features = false, features = ["postgresql"] }
tokio = { version = "1.28.2", features = ["full"] } tokio = { version = "1.32.0", features = ["full"] }
tracing = "0.1.37" tracing = "0.1.37"
tracing-subscriber = { version = "0.3.17", features = ["env-filter"]} tracing-subscriber = { version = "0.3.17", features = ["env-filter"]}
tower-http = { version = "0.4.3", features = ["trace"] } tower-http = { version = "0.4.4", features = ["trace"] }
axum = { version = "0.6.18", features = ["json"] } axum = { version = "0.6.20", features = ["json"] }
axum-extra = { version ="0.7.7", features = ["query"] } axum-extra = { version ="0.7.7", features = ["query"] }
axum-prometheus = "0.4.0" axum-prometheus = "0.4.0"
serde = { version = "1.0.163", features = ["derive"] } serde = { version = "1.0.188", features = ["derive"] }
sentry = { version = "0.31.3", features = ["debug-images"] } sentry = { version = "0.31.7", features = ["debug-images"] }
meilisearch-sdk = "0.24.1" meilisearch-sdk = "0.24.2"
rand = "0.8.5" rand = "0.8.5"
chrono = "0.4.26" chrono = "0.4.30"

View File

@@ -380,7 +380,7 @@ pub async fn get_book_annotation(
db: Database, db: Database,
Path(book_id): Path<i32>, Path(book_id): Path<i32>,
) -> impl IntoResponse { ) -> impl IntoResponse {
let book_annotaion = db let book_annotation = db
.book_annotation() .book_annotation()
.find_unique( .find_unique(
book_annotation::book_id::equals(book_id) book_annotation::book_id::equals(book_id)
@@ -389,7 +389,7 @@ pub async fn get_book_annotation(
.await .await
.unwrap(); .unwrap();
match book_annotaion { match book_annotation {
Some(book_annotation) => Json::<BookAnnotation>(book_annotation.into()).into_response(), Some(book_annotation) => Json::<BookAnnotation>(book_annotation.into()).into_response(),
None => StatusCode::NOT_FOUND.into_response(), None => StatusCode::NOT_FOUND.into_response(),
} }