diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 697b2de..48f2332 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -35,7 +35,7 @@ checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "once_cell", - "version_check 0.9.5", + "version_check", "zerocopy", ] @@ -90,12 +90,6 @@ dependencies = [ "derive_arbitrary", ] -[[package]] -name = "ascii" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97be891acc47ca214468e09425d02cef3af2c94d0d82081cd02061f996802f14" - [[package]] name = "async-trait" version = "0.1.85" @@ -113,15 +107,6 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "autocfg" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" -dependencies = [ - "autocfg 1.4.0", -] - [[package]] name = "autocfg" version = "1.4.0" @@ -151,10 +136,10 @@ dependencies = [ "hex", "http 0.2.12", "ring", - "time 0.3.37", + "time", "tokio", "tracing", - "url 2.5.4", + "url", "zeroize", ] @@ -189,7 +174,7 @@ dependencies = [ "http 0.2.12", "http-body 0.4.6", "once_cell", - "percent-encoding 2.3.1", + "percent-encoding", "pin-project-lite", "tracing", "uuid", @@ -303,11 +288,11 @@ dependencies = [ "http 1.2.0", "once_cell", "p256", - "percent-encoding 2.3.1", + "percent-encoding", "ring", "sha2", "subtle", - "time 0.3.37", + "time", "tracing", "zeroize", ] @@ -337,7 +322,7 @@ dependencies = [ "http 0.2.12", "http-body 0.4.6", "once_cell", - "percent-encoding 2.3.1", + "percent-encoding", "pin-project-lite", "pin-utils", "tracing", @@ -427,7 +412,7 @@ dependencies = [ "pin-utils", "ryu", "serde", - "time 0.3.37", + "time", "tokio", "tokio-util", ] @@ -473,8 +458,8 @@ dependencies = [ "itoa", "matchit 0.7.3", "memchr", - "mime 0.3.17", - "percent-encoding 2.3.1", + "mime", + "percent-encoding", "pin-project-lite", "rustversion", "serde", @@ -507,8 +492,8 @@ dependencies = [ "itoa", "matchit 0.8.4", "memchr", - "mime 0.3.17", - "percent-encoding 2.3.1", + "mime", + "percent-encoding", "pin-project-lite", "rustversion", "serde", @@ -535,7 +520,7 @@ dependencies = [ "http 1.2.0", "http-body 1.0.1", "http-body-util", - "mime 0.3.17", + "mime", "pin-project-lite", "rustversion", "sync_wrapper 1.0.2", @@ -555,7 +540,7 @@ dependencies = [ "http 1.2.0", "http-body 1.0.1", "http-body-util", - "mime 0.3.17", + "mime", "pin-project-lite", "rustversion", "sync_wrapper 1.0.2", @@ -578,7 +563,7 @@ dependencies = [ "http 1.2.0", "http-body 1.0.1", "http-body-util", - "mime 0.3.17", + "mime", "multer 3.1.0", "pin-project-lite", "serde", @@ -632,9 +617,8 @@ dependencies = [ "lettre", "mockall", "mrml", - "multipart", "once_cell", - "reqwest 0.12.12", + "reqwest 0.12.15", "serde", "serde_json", "tera", @@ -643,7 +627,7 @@ dependencies = [ "tokio", "tower 0.5.2", "tower-http", - "url 2.5.4", + "url", "utoipa", "utoipa-swagger-ui", "uuid", @@ -671,16 +655,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" -[[package]] -name = "base64" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -dependencies = [ - "byteorder", - "safemem", -] - [[package]] name = "base64" version = "0.21.7" @@ -740,16 +714,6 @@ dependencies = [ "serde", ] -[[package]] -name = "buf_redux" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b953a6887648bb07a535631f2bc00fbdb2a2216f135552cb3f534ed136b9c07f" -dependencies = [ - "memchr", - "safemem", -] - [[package]] name = "bumpalo" version = "3.17.0" @@ -816,7 +780,7 @@ checksum = "93698b29de5e97ad0ae26447b344c482a7284c737d9ddc5f9e52b74a336671bb" dependencies = [ "chrono", "chrono-tz-build", - "phf 0.11.3", + "phf", ] [[package]] @@ -826,8 +790,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c088aee841df9c3041febbb73934cfc39708749bf96dc827e3359cd39ef11b1" dependencies = [ "parse-zoneinfo", - "phf 0.11.3", - "phf_codegen 0.11.3", + "phf", + "phf_codegen", ] [[package]] @@ -840,21 +804,6 @@ dependencies = [ "stacker", ] -[[package]] -name = "chunked_transfer" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "498d20a7aaf62625b9bf26e637cf7736417cde1d0c99f1d04d1170229a85cf87" - -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "const-oid" version = "0.9.6" @@ -1335,7 +1284,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "percent-encoding 2.3.1", + "percent-encoding", ] [[package]] @@ -1344,12 +1293,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - [[package]] name = "futures-channel" version = "0.3.31" @@ -1425,7 +1368,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", - "version_check 0.9.5", + "version_check", ] [[package]] @@ -1467,7 +1410,7 @@ checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", - "log 0.4.25", + "log", "regex-automata", "regex-syntax", ] @@ -1517,12 +1460,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "groupable" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32619942b8be646939eaf3db0602b39f5229b74575b67efc897811ded1db4e57" - [[package]] name = "h2" version = "0.3.26" @@ -1593,7 +1530,7 @@ dependencies = [ "headers-core", "http 0.2.12", "httpdate", - "mime 0.3.17", + "mime", "sha1", ] @@ -1618,12 +1555,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "hex" version = "0.4.3" @@ -1727,25 +1658,6 @@ dependencies = [ "libm", ] -[[package]] -name = "hyper" -version = "0.10.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" -dependencies = [ - "base64 0.9.3", - "httparse", - "language-tags", - "log 0.3.9", - "mime 0.2.6", - "num_cpus", - "time 0.1.45", - "traitobject", - "typeable", - "unicase 1.4.2", - "url 1.7.2", -] - [[package]] name = "hyper" version = "0.14.32" @@ -1800,7 +1712,7 @@ dependencies = [ "futures-util", "http 0.2.12", "hyper 0.14.32", - "log 0.4.25", + "log", "rustls 0.21.12", "rustls-native-certs", "tokio", @@ -2006,17 +1918,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "1.0.3" @@ -2046,7 +1947,7 @@ checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ "crossbeam-deque", "globset", - "log 0.4.25", + "log", "memchr", "regex-automata", "same-file", @@ -2071,22 +1972,6 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" -[[package]] -name = "iron" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6d308ca2d884650a8bf9ed2ff4cb13fbb2207b71f64cda11dc9b892067295e8" -dependencies = [ - "hyper 0.10.16", - "log 0.3.9", - "mime_guess 1.8.8", - "modifier", - "num_cpus", - "plugin", - "typemap", - "url 1.7.2", -] - [[package]] name = "itertools" version = "0.12.1" @@ -2112,12 +1997,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - [[package]] name = "lazy_static" version = "1.5.0" @@ -2138,15 +2017,15 @@ dependencies = [ "futures-util", "hostname", "httpdate", - "idna 1.0.3", - "mime 0.3.17", + "idna", + "mime", "native-tls", "nom", - "percent-encoding 2.3.1", + "percent-encoding", "quoted_printable", "socket2", "tokio", - "url 2.5.4", + "url", ] [[package]] @@ -2179,7 +2058,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ - "autocfg 1.4.0", + "autocfg", "scopeguard", ] @@ -2189,27 +2068,12 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" -[[package]] -name = "log" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -dependencies = [ - "log 0.4.25", -] - [[package]] name = "log" version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.7.3" @@ -2259,41 +2123,20 @@ dependencies = [ "quote", ] -[[package]] -name = "mime" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" -dependencies = [ - "log 0.3.9", -] - [[package]] name = "mime" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "mime_guess" -version = "1.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216929a5ee4dd316b1702eedf5e74548c123d370f47841ceaac38ca154690ca3" -dependencies = [ - "mime 0.2.6", - "phf 0.7.24", - "phf_codegen 0.7.24", - "unicase 1.4.2", -] - [[package]] name = "mime_guess" version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ - "mime 0.3.17", - "unicase 2.8.1", + "mime", + "unicase", ] [[package]] @@ -2342,12 +2185,6 @@ dependencies = [ "syn", ] -[[package]] -name = "modifier" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" - [[package]] name = "mrml" version = "3.1.5" @@ -2425,11 +2262,11 @@ dependencies = [ "futures-util", "http 0.2.12", "httparse", - "log 0.4.25", + "log", "memchr", - "mime 0.3.17", + "mime", "spin", - "version_check 0.9.5", + "version_check", ] [[package]] @@ -2444,41 +2281,9 @@ dependencies = [ "http 1.2.0", "httparse", "memchr", - "mime 0.3.17", + "mime", "spin", - "version_check 0.9.5", -] - -[[package]] -name = "multipart" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00dec633863867f29cb39df64a397cdf4a6354708ddd7759f70c7fb51c5f9182" -dependencies = [ - "buf_redux", - "httparse", - "hyper 0.10.16", - "iron", - "log 0.4.25", - "mime 0.3.17", - "mime_guess 2.0.5", - "nickel", - "quick-error", - "rand 0.8.5", - "safemem", - "tempfile", - "tiny_http", - "twoway", -] - -[[package]] -name = "mustache" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51956ef1c5d20a1384524d91e616fb44dfc7d8f249bf696d49c97dd3289ecab5" -dependencies = [ - "log 0.3.9", - "serde", + "version_check", ] [[package]] @@ -2488,7 +2293,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c" dependencies = [ "libc", - "log 0.4.25", + "log", "openssl", "openssl-probe", "openssl-sys", @@ -2498,27 +2303,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "nickel" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5061a832728db2dacb61cefe0ce303b58f85764ec680e71d9138229640a46d9" -dependencies = [ - "groupable", - "hyper 0.10.16", - "lazy_static", - "log 0.3.9", - "modifier", - "mustache", - "plugin", - "regex", - "serde", - "serde_json", - "time 0.1.45", - "typemap", - "url 1.7.2", -] - [[package]] name = "nom" version = "8.0.0" @@ -2565,17 +2349,7 @@ version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ - "autocfg 1.4.0", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", + "autocfg", ] [[package]] @@ -2692,12 +2466,6 @@ dependencies = [ "regex", ] -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - [[package]] name = "percent-encoding" version = "2.3.1" @@ -2749,32 +2517,13 @@ dependencies = [ "sha2", ] -[[package]] -name = "phf" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" -dependencies = [ - "phf_shared 0.7.24", -] - [[package]] name = "phf" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ - "phf_shared 0.11.3", -] - -[[package]] -name = "phf_codegen" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" -dependencies = [ - "phf_generator 0.7.24", - "phf_shared 0.7.24", + "phf_shared", ] [[package]] @@ -2783,18 +2532,8 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" dependencies = [ - "phf_generator 0.11.3", - "phf_shared 0.11.3", -] - -[[package]] -name = "phf_generator" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" -dependencies = [ - "phf_shared 0.7.24", - "rand 0.6.5", + "phf_generator", + "phf_shared", ] [[package]] @@ -2803,27 +2542,17 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ - "phf_shared 0.11.3", + "phf_shared", "rand 0.8.5", ] -[[package]] -name = "phf_shared" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" -dependencies = [ - "siphasher 0.2.3", - "unicase 1.4.2", -] - [[package]] name = "phf_shared" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" dependencies = [ - "siphasher 1.0.1", + "siphasher", ] [[package]] @@ -2874,15 +2603,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" -[[package]] -name = "plugin" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a6a0dc3910bc8db877ffed8e457763b317cf880df4ae19109b9f77d277cf6e0" -dependencies = [ - "typemap", -] - [[package]] name = "portable-atomic" version = "1.11.0" @@ -3001,12 +2721,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - [[package]] name = "quote" version = "1.0.38" @@ -3028,30 +2742,11 @@ version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" dependencies = [ - "log 0.4.25", + "log", "parking_lot", "scheduled-thread-pool", ] -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.8", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg", - "rand_xorshift", - "winapi", -] - [[package]] name = "rand" version = "0.8.5" @@ -3073,16 +2768,6 @@ dependencies = [ "rand_core 0.9.3", ] -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.8", - "rand_core 0.3.1", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -3103,21 +2788,6 @@ dependencies = [ "rand_core 0.9.3", ] -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - [[package]] name = "rand_core" version = "0.6.4" @@ -3136,68 +2806,6 @@ dependencies = [ "getrandom 0.3.1", ] -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -dependencies = [ - "autocfg 0.1.8", - "rand_core 0.4.2", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "raw-cpuid" version = "11.5.0" @@ -3207,15 +2815,6 @@ dependencies = [ "bitflags 2.8.0", ] -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "redox_syscall" version = "0.5.8" @@ -3277,11 +2876,11 @@ dependencies = [ "hyper 0.14.32", "ipnet", "js-sys", - "log 0.4.25", - "mime 0.3.17", - "mime_guess 2.0.5", + "log", + "mime", + "mime_guess", "once_cell", - "percent-encoding 2.3.1", + "percent-encoding", "pin-project-lite", "serde", "serde_json", @@ -3290,7 +2889,7 @@ dependencies = [ "system-configuration 0.5.1", "tokio", "tower-service", - "url 2.5.4", + "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -3299,9 +2898,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.12" +version = "0.12.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" +checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" dependencies = [ "base64 0.22.1", "bytes", @@ -3318,11 +2917,11 @@ dependencies = [ "hyper-util", "ipnet", "js-sys", - "log 0.4.25", - "mime 0.3.17", + "log", + "mime", "native-tls", "once_cell", - "percent-encoding 2.3.1", + "percent-encoding", "pin-project-lite", "rustls-pemfile 2.2.0", "serde", @@ -3334,7 +2933,7 @@ dependencies = [ "tokio-native-tls", "tower 0.5.2", "tower-service", - "url 2.5.4", + "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -3441,7 +3040,7 @@ version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ - "log 0.4.25", + "log", "ring", "rustls-webpki 0.101.7", "sct", @@ -3529,12 +3128,6 @@ version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - [[package]] name = "same-file" version = "1.0.6" @@ -3761,12 +3354,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" -[[package]] -name = "siphasher" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" - [[package]] name = "siphasher" version = "1.0.1" @@ -3779,7 +3366,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "autocfg 1.4.0", + "autocfg", ] [[package]] @@ -3979,7 +3566,7 @@ dependencies = [ "globwalk", "humansize", "lazy_static", - "percent-encoding 2.3.1", + "percent-encoding", "pest", "pest_derive", "rand 0.8.5", @@ -4046,17 +3633,6 @@ dependencies = [ "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]] name = "time" version = "0.3.37" @@ -4087,19 +3663,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny_http" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e22cb179b63e5fc2d0b5be237dc107da072e2407809ac70a8ce85b93fe8f562" -dependencies = [ - "ascii", - "chrono", - "chunked_transfer", - "log 0.4.25", - "url 1.7.2", -] - [[package]] name = "tinystr" version = "0.7.6" @@ -4133,9 +3696,9 @@ checksum = "43b432f4112b803f1ced6a45a6639965e6ac7b43e9f39cf758121848300ed525" [[package]] name = "tokio" -version = "1.43.0" +version = "1.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" dependencies = [ "backtrace", "bytes", @@ -4182,10 +3745,10 @@ dependencies = [ "fallible-iterator", "futures-channel", "futures-util", - "log 0.4.25", + "log", "parking_lot", - "percent-encoding 2.3.1", - "phf 0.11.3", + "percent-encoding", + "phf", "pin-project-lite", "postgres-protocol", "postgres-types", @@ -4223,7 +3786,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" dependencies = [ "futures-util", - "log 0.4.25", + "log", "tokio", "tungstenite", ] @@ -4339,7 +3902,7 @@ version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ - "log 0.4.25", + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4372,7 +3935,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "log 0.4.25", + "log", "once_cell", "tracing-core", ] @@ -4404,12 +3967,6 @@ dependencies = [ "tracing-serde", ] -[[package]] -name = "traitobject" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04a79e25382e2e852e8da874249358d382ebaf259d0d34e75d8db16a7efabbc7" - [[package]] name = "try-lock" version = "0.2.5" @@ -4427,38 +3984,14 @@ dependencies = [ "data-encoding", "http 1.2.0", "httparse", - "log 0.4.25", + "log", "rand 0.8.5", "sha1", "thiserror 1.0.69", - "url 2.5.4", + "url", "utf-8", ] -[[package]] -name = "twoway" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" -dependencies = [ - "memchr", -] - -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" - -[[package]] -name = "typemap" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" -dependencies = [ - "unsafe-any", -] - [[package]] name = "typenum" version = "1.17.0" @@ -4521,15 +4054,6 @@ dependencies = [ "unic-common", ] -[[package]] -name = "unicase" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -dependencies = [ - "version_check 0.1.5", -] - [[package]] name = "unicase" version = "2.8.1" @@ -4563,32 +4087,12 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" -[[package]] -name = "unsafe-any" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" -dependencies = [ - "traitobject", -] - [[package]] name = "untrusted" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna 0.1.5", - "matches", - "percent-encoding 1.0.1", -] - [[package]] name = "url" version = "2.5.4" @@ -4596,8 +4100,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", - "idna 1.0.3", - "percent-encoding 2.3.1", + "idna", + "percent-encoding", ] [[package]] @@ -4650,18 +4154,18 @@ dependencies = [ [[package]] name = "utoipa-swagger-ui" -version = "9.0.0" +version = "9.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161166ec520c50144922a625d8bc4925cc801b2dda958ab69878527c0e5c5d61" +checksum = "d29519b3c485df6b13f4478ac909a491387e9ef70204487c3b64b53749aec0be" dependencies = [ "axum 0.8.1", "base64 0.22.1", - "mime_guess 2.0.5", + "mime_guess", "regex", "rust-embed", "serde", "serde_json", - "url 2.5.4", + "url", "utoipa", "zip", ] @@ -4688,12 +4192,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" - [[package]] name = "version_check" version = "0.9.5" @@ -4737,11 +4235,11 @@ dependencies = [ "headers", "http 0.2.12", "hyper 0.14.32", - "log 0.4.25", - "mime 0.3.17", - "mime_guess 2.0.5", + "log", + "mime", + "mime_guess", "multer 2.1.0", - "percent-encoding 2.3.1", + "percent-encoding", "pin-project", "scoped-tls", "serde", @@ -4754,12 +4252,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -4800,7 +4292,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", - "log 0.4.25", + "log", "proc-macro2", "quote", "syn", @@ -4933,34 +4425,39 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-link" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" + [[package]] name = "windows-registry" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ "windows-result", "windows-strings", - "windows-targets 0.52.6", + "windows-targets 0.53.0", ] [[package]] name = "windows-result" -version = "0.2.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" dependencies = [ - "windows-targets 0.52.6", + "windows-link", ] [[package]] name = "windows-strings" -version = "0.1.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" dependencies = [ - "windows-result", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -5014,13 +4511,29 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -5033,6 +4546,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -5045,6 +4564,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -5057,12 +4582,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -5075,6 +4612,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -5087,6 +4630,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -5099,6 +4648,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -5111,6 +4666,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winnow" version = "0.6.25" @@ -5253,18 +4814,16 @@ dependencies = [ [[package]] name = "zip" -version = "2.2.2" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45" +checksum = "1dcb24d0152526ae49b9b96c1dcf71850ca1e0b882e4e28ed898a93c41334744" dependencies = [ "arbitrary", "crc32fast", "crossbeam-utils", - "displaydoc", "flate2", "indexmap", "memchr", - "thiserror 2.0.11", "zopfli", ] @@ -5277,7 +4836,7 @@ dependencies = [ "bumpalo", "crc32fast", "lockfree-object-pool", - "log 0.4.25", + "log", "once_cell", "simd-adler32", ] diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 52e14ab..bf68188 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" [dependencies] axum = "0.8.1" -tokio = { version = "1.43.0", features = ["full"] } +tokio = { version = "1.43.1", features = ["full"] } dotenv = "0.15.0" tower-http = { version = "0.6", features = ["cors", "trace"] } serde = { version = "1.0.217", features = ["derive"] } @@ -27,7 +27,7 @@ diesel_migrations = "2.2.0" uuid = { version = "1.12.1", features = ["serde", "v4" ] } utoipa = { version = "5.3.1", features = ["axum_extras"] } -utoipa-swagger-ui = {version = "9.0.0", features=["axum"] } +utoipa-swagger-ui = {version = "9.0.1", features=["axum"] } url = "2.5.4" warp = "0.3.7" @@ -36,15 +36,14 @@ thiserror = "2" anyhow = "1.0.95" mockall = "0.13.1" async-trait = "0.1.85" -reqwest = { version = "0.12", features = ["json"] } +reqwest = { version = "0.12.15", features = ["json"] } diesel-derive-enum = {version= "2.1.0", features=["postgres"] } -multipart = "0.18.0" axum-extra = { version = "0.10.0", features = ["multipart"] } csv = "1.3.1" -lettre = "0.11.14" +lettre = "0.11.15" tokenbucket = "0.1.6" governor = "0.10.0" diff --git a/backend/src/handlers/contact.rs b/backend/src/handlers/contact.rs index 6e5ec9f..2971ca1 100644 --- a/backend/src/handlers/contact.rs +++ b/backend/src/handlers/contact.rs @@ -262,5 +262,6 @@ pub async fn get_mails_by_contact_id( scheduled_at: mail.scheduled_at, attempts: mail.attempts, last_error: mail.last_error, + from_name: mail.from_name, }).collect())) } \ No newline at end of file diff --git a/backend/src/handlers/mail_handler.rs b/backend/src/handlers/mail_handler.rs index c343818..ee8586a 100644 --- a/backend/src/handlers/mail_handler.rs +++ b/backend/src/handlers/mail_handler.rs @@ -80,6 +80,7 @@ pub async fn get_all_mails( scheduled_at: mail.scheduled_at, attempts: mail.attempts, last_error: mail.last_error.clone(), + from_name: mail.from_name.clone(), }); }); Ok(Json(responses)) @@ -119,4 +120,46 @@ pub async fn delete_mail( let deleted_mail = mail_service.delete_mail(mail_id).await?; Ok(Json(deleted_mail)) +} + + +#[utoipa::path( + get, + path = "/api/mails/bounce", + responses( + (status = 200, description = "Get all bounced mails", body = Vec), + (status = 404) + ) +)] +pub async fn get_bounced_mails( + Extension(mail_service): Extension>, +) -> Result>, AppError> { + let all_bounced_mails = mail_service.fetch_bounced_mails().await?; + + let mut responses = Vec::new(); + + if all_bounced_mails.is_empty() { + return Ok(Json(vec![])); + } + all_bounced_mails.iter().for_each(|mail| { + responses.push(GetMailResponse { + id: mail.id.clone(), + mail_message: mail.mail_message.clone(), + email: mail.email.clone(), + template_id: mail.template_id.clone(), + campaign_id: mail.campaign_id, + sent_at: mail.sent_at, + open: mail.open, + clicks: mail.clicks, + status: mail.status.clone(), + status_reason: mail.reason.clone(), + server_id: mail.server_id.clone(), + scheduled_at: mail.scheduled_at, + attempts: mail.attempts, + last_error: mail.last_error.clone(), + from_name: mail.from_name.clone(), + }); + }); + Ok(Json(responses)) + } \ No newline at end of file diff --git a/backend/src/main.rs b/backend/src/main.rs index 5c9133b..4c2a826 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -57,17 +57,32 @@ async fn main() { // Instantiate the server service and repository one time, and inject it to the process_mails background process... let server_repo = Arc::new(servers_repo::ServerRepoImpl); - let server_service = servers_services::ServerService::new(server_repo); + let server_service = Arc::new(servers_services::ServerService::new(server_repo)); let mail_repo = Arc::new(mail_repository::MailRepositoryImpl); - let mail_service = mail_service::MailService::new(mail_repo); + let mail_service = Arc::new(mail_service::MailService::new(mail_repo)); // Worker for processing mails... - tokio::spawn(async move { - if let Err(err) = mail_service.process_mails(server_service.into()).await.map_err(|err| AppError::InternalServerError(Some(format!("Mail worker error: {:?}", err.to_string())))) { - eprintln!("Error occurred in mail worker: {:?}", err); - } - }); + { + let mail_service = Arc::clone(&mail_service); + let server_service = Arc::clone(&server_service); + tokio::spawn(async move { + if let Err(err) = mail_service.process_mails(server_service.into()).await.map_err(|err| AppError::InternalServerError(Some(format!("Mail worker error: {:?}", err.to_string())))) { + eprintln!("Error occurred in mail worker: {:?}", err); + } + }); + } + + // Worker for retrying submitted but not delivered mails... + { + let mail_service = Arc::clone(&mail_service); + let server_service = Arc::clone(&server_service); + tokio::spawn(async move { + if let Err(err) = mail_service.process_submitted_mails(server_service.into()).await.map_err(|err| AppError::InternalServerError(Some(format!("Mail retry worker error: {:?}", err.to_string())))) { + eprintln!("Error occurred in mail retry worker: {:?}", err); + } + }); + } // Address configuration let addr = env::var("SERVER_ADDRESS").unwrap_or_else(|_| "0.0.0.0:8000".to_string()); diff --git a/backend/src/models/mail.rs b/backend/src/models/mail.rs index 208cea5..2e29b9a 100644 --- a/backend/src/models/mail.rs +++ b/backend/src/models/mail.rs @@ -80,6 +80,9 @@ pub struct MailWithDetails { #[diesel(sql_type = diesel::sql_types::Nullable)] pub reason: Option, // This comes from bounce_logs.reason + + #[diesel(sql_type = diesel::sql_types::Nullable)] + pub from_name: Option, } @@ -108,6 +111,7 @@ pub struct GetMailResponse { pub clicks: i32, pub status: String, pub status_reason: Option, + pub from_name: Option, #[schema(value_type = String, example = "2023-01-01T00:00:00Z")] pub scheduled_at: DateTime, diff --git a/backend/src/repositories/campaign.rs b/backend/src/repositories/campaign.rs index cca4f2a..94eb7d2 100644 --- a/backend/src/repositories/campaign.rs +++ b/backend/src/repositories/campaign.rs @@ -52,6 +52,7 @@ impl CampaignRepository for CampaginRepositoryImpl { created_at, updated_at )) + .order(updated_at.desc()) .load::(&mut conn) } async fn update_campaign(&self, campaign_id: Uuid, payload: UpdateCampaignRequest)->Result { @@ -63,7 +64,8 @@ impl CampaignRepository for CampaginRepositoryImpl { template_id.eq(&payload.template_id), status.eq(&payload.status), campaign_senders.eq(&payload.campaign_senders), - scheduled_at.eq(&payload.scheduled_at) + scheduled_at.eq(&payload.scheduled_at), + updated_at.eq(diesel::dsl::now), )) .get_result(&mut conn) } diff --git a/backend/src/repositories/list_repo.rs b/backend/src/repositories/list_repo.rs index d4882fc..415f1ae 100644 --- a/backend/src/repositories/list_repo.rs +++ b/backend/src/repositories/list_repo.rs @@ -19,10 +19,10 @@ pub async fn get_connection_pool() -> DbPooledConnection { #[async_trait] pub trait ListRepository { async fn create_list(&self, payload: CreateListRequest) -> Result; - async fn get_all_lists(&self, namespaceId: Uuid) -> Result, diesel::result::Error>; - async fn get_list_by_id(&self, namespaceId: Uuid, list_id: Uuid) -> Result; - async fn update_list(&self, namespaceId: Uuid, list_id: Uuid, payload: UpdateListRequest) -> Result; - async fn delete_list(&self, namespaceId: Uuid, list_id: Uuid)->Result; + async fn get_all_lists(&self, namespace_uuid: Uuid) -> Result, diesel::result::Error>; + async fn get_list_by_id(&self, namespace_uuid: Uuid, list_id: Uuid) -> Result; + async fn update_list(&self, namespace_uuid: Uuid, list_id: Uuid, payload: UpdateListRequest) -> Result; + async fn delete_list(&self, namespace_uuid: Uuid, list_id: Uuid)->Result; } @@ -46,7 +46,7 @@ async fn create_list ( .get_result::(&mut conn) } -async fn get_all_lists(&self, namespaceId: Uuid) -> Result, diesel::result::Error> { +async fn get_all_lists(&self, namespace_uuid: Uuid) -> Result, diesel::result::Error> { let mut conn = get_connection_pool().await; lists @@ -58,23 +58,24 @@ async fn get_all_lists(&self, namespaceId: Uuid) -> Result, diesel::re created_at, updated_at )) - .filter(namespace_id.eq(namespaceId)) + .filter(namespace_id.eq(namespace_uuid)) + .order(updated_at.desc()) .load::(&mut conn) } -async fn get_list_by_id(&self, namespaceId: Uuid, list_id: Uuid) -> Result { +async fn get_list_by_id(&self, namespace_uuid: Uuid, list_id: Uuid) -> Result { let mut conn = get_connection_pool().await; // Ensure you're querying with both Uuids lists - .filter(namespace_id.eq(namespaceId)) // Make sure this is referencing the correct variable + .filter(namespace_id.eq(namespace_uuid)) // Make sure this is referencing the correct variable .filter(id.eq(list_id)) // Filter by list_id as well .first(&mut conn) } async fn update_list ( &self, - namespaceId: Uuid, + namespace_uuid: Uuid, list_id: Uuid, payload: UpdateListRequest ) -> Result { @@ -83,18 +84,19 @@ async fn update_list ( diesel::update(lists) .filter(id.eq(list_id)) - .filter(namespace_id.eq(namespaceId)) + .filter(namespace_id.eq(namespace_uuid)) .set(( name.eq(payload.name), - description.eq(payload.description) + description.eq(payload.description), + updated_at.eq(diesel::dsl::now), )) .get_result(&mut conn) } - async fn delete_list(&self, namespaceId: Uuid, list_id: Uuid) -> Result { + async fn delete_list(&self, namespace_uuid: Uuid, list_id: Uuid) -> Result { let mut conn = get_connection_pool().await; - diesel::delete(lists.filter(namespace_id.eq(namespaceId))) + diesel::delete(lists.filter(namespace_id.eq(namespace_uuid))) .filter(id.eq(list_id)) .get_result(&mut conn) } diff --git a/backend/src/repositories/mail_repository.rs b/backend/src/repositories/mail_repository.rs index 06d8286..b24c8f9 100644 --- a/backend/src/repositories/mail_repository.rs +++ b/backend/src/repositories/mail_repository.rs @@ -1,13 +1,19 @@ +use crate::servers::servers_model::ServerTypeEnum; use crate::{ appState::DbPooledConnection, GLOBAL_APP_STATE }; use crate::schema::mails::dsl::*; use crate::schema::contacts::dsl as contacts_dsl; use crate::schema::bounce_logs::dsl as bounce_logs_dsl; +use crate::schema::campaign_senders::dsl as campaign_senders_dsl; +use crate::schema::campaigns::dsl as campaigns_dsl; +use crate::schema::servers::{dsl as servers_dsl, server_type}; use diesel::prelude::*; -use chrono::{ Utc, DateTime }; +use chrono::{ Utc, DateTime, Duration }; use crate::models::mail::{ Mail, MailWithDetails, NewMail, UpdateMailRequest }; use uuid::Uuid; +use diesel::dsl::sql; +use diesel::sql_types::{ Nullable, Text }; use mockall::{ automock, predicate::* }; use async_trait::async_trait; @@ -28,7 +34,10 @@ pub trait MailRepository { async fn delete_mail(&self, mail_id: String) -> Result; async fn increment_mail_clicks(&self, mail_id: String) -> Result; async fn get_mails_by_contact(&self, c_id: Uuid) -> Result, diesel::result::Error>; - async fn get_queued_mails(&self) -> Result, diesel::result::Error>; + async fn get_mails_by_status(&self, mail_status: &str, is_ascending: bool) -> Result, diesel::result::Error>; + async fn get_stale_submitted_mails(&self) -> Result, diesel::result::Error>; + async fn update_mail_attempts(&self, mail_id: String) -> Result; + async fn udpate_mail_last_try_error(&self, mail_id: String, error: &str) -> Result; } pub struct MailRepositoryImpl; @@ -65,6 +74,7 @@ impl MailRepository for MailRepositoryImpl { last_error, contacts_dsl::email, bounce_logs_dsl::reason.nullable(), + sql::>("NULL") )) .into_boxed(); @@ -144,19 +154,58 @@ impl MailRepository for MailRepositoryImpl { attempts, last_error, contacts_dsl::email, - bounce_logs_dsl::reason.nullable() + bounce_logs_dsl::reason.nullable(), + sql::>("NULL") )) .filter(contact_id.eq(c_id)) .order(sent_at.desc()) .load::(&mut conn) } - async fn get_queued_mails(&self) -> Result, diesel::result::Error> { + async fn get_mails_by_status(&self, mail_status: &str, is_ascending: bool) -> Result, diesel::result::Error> { let mut conn = get_connection_pool().await; + + let mut query_results = mails + .inner_join(contacts_dsl::contacts.on(contact_id.eq(contacts_dsl::id))) + .inner_join(campaigns_dsl::campaigns.on(campaign_id.eq(campaigns_dsl::id.nullable()))) + .inner_join(campaign_senders_dsl::campaign_senders.on(campaigns_dsl::campaign_senders.eq(campaign_senders_dsl::id.nullable()))) + .left_outer_join(bounce_logs_dsl::bounce_logs.on(id.eq(bounce_logs_dsl::mail_id))) + .select(( + id, + mail_message, + template_id, + campaign_id, + server_id, + sent_at, + status, + open, + clicks, + scheduled_at, + attempts, + last_error, + contacts_dsl::email, + bounce_logs_dsl::reason.nullable(), + campaign_senders_dsl::from_name.nullable(), + )) + .filter(status.eq(mail_status)) + .into_boxed(); + + if is_ascending { + query_results = query_results.order(sent_at.asc()); + } else { + query_results = query_results.order(sent_at.desc()); + } + query_results.load::(&mut conn) + } + + async fn get_stale_submitted_mails(&self) -> Result, diesel::result::Error> { + let mut conn = get_connection_pool().await; + let stale_duration_minutes = 30; // only send retry those mails that are older than 30 minutes... mails .inner_join(contacts_dsl::contacts.on(contact_id.eq(contacts_dsl::id))) .left_outer_join(bounce_logs_dsl::bounce_logs.on(id.eq(bounce_logs_dsl::mail_id))) + .left_outer_join(servers_dsl::servers.on(server_id.eq(servers_dsl::id.nullable()))) .select(( id, mail_message, @@ -172,9 +221,29 @@ impl MailRepository for MailRepositoryImpl { last_error, contacts_dsl::email, bounce_logs_dsl::reason.nullable(), + sql::>("NULL") )) - .filter(status.eq("queued")) - .order(sent_at.asc()) // Order by sent_at ascending here... + .filter(status.eq("submitted")) + .filter(server_type.eq(ServerTypeEnum::AWS)) + .filter(sent_at.lt(Utc::now().naive_utc() - Duration::minutes(stale_duration_minutes))) + .filter(attempts.le(3)) + .order(sent_at.asc()) .load::(&mut conn) } + + async fn update_mail_attempts(&self, mail_id: String) -> Result { + let mut conn = get_connection_pool().await; + + diesel::update(mails.find(mail_id)) + .set(attempts.eq(attempts + 1)) + .get_result(&mut conn) + } + + async fn udpate_mail_last_try_error(&self, mail_id: String, error: &str) -> Result { + let mut conn = get_connection_pool().await; + + diesel::update(mails.find(mail_id)) + .set(last_error.eq(error)) + .get_result(&mut conn) + } } \ No newline at end of file diff --git a/backend/src/repositories/template_repo.rs b/backend/src/repositories/template_repo.rs index 6cdd704..03bc07f 100644 --- a/backend/src/repositories/template_repo.rs +++ b/backend/src/repositories/template_repo.rs @@ -58,6 +58,7 @@ impl TemplateRepository for TemplateRespositoryImpl { created_at, updated_at, )) // Select columns explicitly + .order(updated_at.desc()) .load::