Updated dependencies and adjusted code to update.

This commit is contained in:
2026-06-06 19:42:56 +02:00
parent f136d09f84
commit f2556d0095
9 changed files with 3123 additions and 3023 deletions
Generated
+415 -830
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -7,11 +7,11 @@ authors = ["Matthias Lodner <matthias@lodner.de>"]
[dependencies]
# Deserialize/Serialize
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
serde_json = "1.0.150"
# Database
sqlx = { version = "0.8.6", features = [ "runtime-async-std-native-tls", "postgres", "chrono" ] }
sqlx = { version = "0.9.0", features = [ "runtime-async-std", "postgres", "chrono" ] }
# Etc.
chrono = { version = "0.4.44", features = [ "serde" ] }
log = "0.4.29"
chrono = { version = "0.4.45", features = [ "serde" ] }
log = "0.4.32"
+7 -7
View File
@@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize};
use sqlx::{FromRow, PgPool};
use crate::models::origin::Origin;
use crate::models::variant::{load_article_variants, Variant};
use sqlx::{Arguments, Pool, Row, Postgres, Error};
use sqlx::{Arguments, Pool, Row, Postgres, Error, AssertSqlSafe};
use sqlx::postgres::{PgArguments, PgQueryResult, PgRow};
use log::{debug, error, info};
use crate::models::unit::Unit;
@@ -83,7 +83,7 @@ pub async fn load_articles(pool: PgPool) -> Option<Vec<Article>> {
);
let res = sqlx::query(
statement.as_str())
AssertSqlSafe(statement.as_str()))
.fetch_all(&pool).await;
let mut articles: Vec<Article> = Vec::new();
@@ -115,7 +115,7 @@ pub async fn load_article(id: i64, pool: PgPool) -> Option<Article> {
args.add(id);
let res = sqlx::query_with(
statement.as_str(), args)
AssertSqlSafe(statement.as_str()), args)
.fetch_one(&pool).await;
match res {
@@ -152,7 +152,7 @@ pub async fn insert_article(article: &Article, pool: PgPool) -> Option<Article>
);
let res = sqlx::query_with(
statement.as_str(),
AssertSqlSafe(statement.as_str()),
args)
.fetch_one(&pool).await;
@@ -193,7 +193,7 @@ pub async fn update_article(article_id: i64, article: &Article, pool: PgPool) ->
);
let res = sqlx::query_with(
statement.as_str(),
AssertSqlSafe(statement.as_str()),
args)
.fetch_one(&pool).await;
@@ -213,10 +213,10 @@ pub async fn update_article(article_id: i64, article: &Article, pool: PgPool) ->
pub async fn delete_article(article_id: i64, pool: PgPool) -> Option<()> {
let result = sqlx::query(
format!("DELETE FROM {} WHERE id = {}",
AssertSqlSafe(format!("DELETE FROM {} WHERE id = {}",
"article",
article_id
).as_str()
).as_str())
).execute(&pool).await;
match result {
+7 -7
View File
@@ -1,6 +1,6 @@
use log::{error, info};
use serde::{Deserialize, Serialize};
use sqlx::{Arguments, Decode, Encode, FromRow, PgPool, Row};
use sqlx::{Arguments, AssertSqlSafe, Decode, Encode, FromRow, PgPool, Row};
use sqlx::postgres::{PgArguments, PgRow};
#[derive(Debug, Deserialize, Serialize, Clone, FromRow, Decode, Encode)]
@@ -23,7 +23,7 @@ pub async fn load_labels(pool: PgPool) -> Option<Vec<Label>> {
);
let res = sqlx::query(
statement.as_str())
AssertSqlSafe(statement.as_str()))
.fetch_all(&pool).await;
let mut labels: Vec<Label> = Vec::new();
@@ -55,7 +55,7 @@ pub async fn load_label(id: i64, pool: &PgPool) -> Option<Label> {
args.add(id);
let res = sqlx::query_with(
statement.as_str(), args)
AssertSqlSafe(statement.as_str()), args)
.fetch_one(pool).await;
match res {
@@ -79,7 +79,7 @@ pub async fn insert_label(label: &Label, pool: PgPool) -> Option<Label> {
);
let res = sqlx::query_with(
statement.as_str(),
AssertSqlSafe(statement.as_str()),
args)
.fetch_one(&pool).await;
@@ -109,7 +109,7 @@ pub async fn update_label(label_id: i64, label: &Label, pool: PgPool) -> Option<
);
let res = sqlx::query_with(
statement.as_str(),
AssertSqlSafe(statement.as_str()),
args)
.fetch_one(&pool).await;
@@ -129,10 +129,10 @@ pub async fn update_label(label_id: i64, label: &Label, pool: PgPool) -> Option<
pub async fn delete_label(label_id: i64, pool: PgPool) -> Option<()> {
let result = sqlx::query(
format!("DELETE FROM {} WHERE id = {}",
AssertSqlSafe(format!("DELETE FROM {} WHERE id = {}",
"label",
label_id
).as_str()
).as_str())
).execute(&pool).await;
match result {
+3 -3
View File
@@ -1,6 +1,6 @@
use log::{error, info};
use serde::{Deserialize, Serialize};
use sqlx::{Arguments, Decode, Encode, FromRow, PgPool, Row};
use sqlx::{Arguments, AssertSqlSafe, Decode, Encode, FromRow, PgPool, Row};
use sqlx::postgres::{PgArguments, PgRow};
#[derive(Debug, Deserialize, Serialize, Clone, FromRow, Decode, Encode)]
@@ -29,7 +29,7 @@ pub async fn load_settings(pool: &PgPool) -> Option<Settings> {
);
let res = sqlx::query(
statement.as_str())
AssertSqlSafe(statement.as_str()))
.fetch_one(pool).await;
match res {
@@ -57,7 +57,7 @@ pub async fn update_settings(settings: &Settings, pool: PgPool) -> Option<Settin
);
let res = sqlx::query_with(
statement.as_str(),
AssertSqlSafe(statement.as_str()),
args)
.fetch_one(&pool).await;
+6 -6
View File
@@ -1,6 +1,6 @@
use log::{error, info};
use serde::{Deserialize, Serialize};
use sqlx::{Arguments, FromRow, PgPool, Row};
use sqlx::{Arguments, AssertSqlSafe, FromRow, PgPool, Row};
use sqlx::postgres::{PgArguments, PgRow};
use crate::models::label::{load_label, Label};
use crate::models::unit::Unit;
@@ -54,7 +54,7 @@ pub async fn load_article_variants(article_id: i64, pool: &PgPool) -> Option<Vec
args.add(article_id);
let res = sqlx::query_with(
statement.as_str(), args)
AssertSqlSafe(statement.as_str()), args)
.fetch_all(pool).await;
let mut variants: Vec<Variant> = Vec::new();
@@ -104,7 +104,7 @@ pub async fn insert_variant(article_id: i64, variant: &Variant, pool: PgPool) ->
);
let res = sqlx::query_with(
statement.as_str(),
AssertSqlSafe(statement.as_str()),
args)
.fetch_one(&pool).await;
@@ -152,7 +152,7 @@ pub async fn update_variant(variant_id: i64, variant: &Variant, pool: PgPool) ->
);
let res = sqlx::query_with(
statement.as_str(),
AssertSqlSafe(statement.as_str()),
args)
.fetch_one(&pool).await;
@@ -172,10 +172,10 @@ pub async fn update_variant(variant_id: i64, variant: &Variant, pool: PgPool) ->
pub async fn delete_variant(variant_id: i64, pool: PgPool) -> Option<()> {
let result = sqlx::query(
format!("DELETE FROM {} WHERE id = {}",
AssertSqlSafe(format!("DELETE FROM {} WHERE id = {}",
"variant",
variant_id
).as_str()
).as_str())
).execute(&pool).await;
match result {
+2668 -2153
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -13,14 +13,14 @@
"@fontsource/roboto": "5.2.10",
"@mdi/font": "7.4.47",
"@pinia/nuxt": "0.11.3",
"nuxt": "4.3.1",
"nuxt": "4.4.7",
"pinia": "3.0.4",
"vue": "3.5.29",
"vue-router": "5.0.3",
"vue": "3.5.35",
"vue-router": "5.1.0",
"vuetify-pro-tiptap": "2.8.2"
},
"devDependencies": {
"vite-plugin-vuetify": "2.1.3",
"vuetify": "4.0.1"
"vuetify": "4.1.0"
}
}
+9 -9
View File
@@ -11,22 +11,22 @@ path = "src/main.rs"
[dependencies]
common = {path = "../common"}
axum = "0.8.8"
tokio = { version = "1.50.0", default-features = false, features = ["full"] }
http = "1.4.0"
tower-http = {version = "0.6.8", features = ["cors"]}
axum = "0.8.9"
tokio = { version = "1.52.3", default-features = false, features = ["full"] }
http = "1.4.1"
tower-http = {version = "0.6.11", features = ["cors"]}
tracing = "=0.1.44"
tracing-subscriber = "0.3.22"
tracing-subscriber = "0.3.23"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
serde_json = "1.0.150"
# Logging
env_logger = "0.11.9"
env_logger = "0.11.10"
# Database
sqlx = { version = "0.8.6", features = [ "runtime-async-std-native-tls", "postgres", "chrono", "macros" ] }
sqlx = { version = "0.9.0", features = [ "runtime-async-std", "postgres", "chrono", "macros" ] }
# Etc.
dotenv = "0.15.0"
chrono = { version = "0.4.44" }
chrono = { version = "0.4.45" }