Updated dependencies and adjusted code to update.
This commit is contained in:
Generated
+415
-830
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -7,11 +7,11 @@ authors = ["Matthias Lodner <matthias@lodner.de>"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
# Deserialize/Serialize
|
# Deserialize/Serialize
|
||||||
serde = { version = "1.0.228", features = ["derive"] }
|
serde = { version = "1.0.228", features = ["derive"] }
|
||||||
serde_json = "1.0.149"
|
serde_json = "1.0.150"
|
||||||
|
|
||||||
# Database
|
# 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.
|
# Etc.
|
||||||
chrono = { version = "0.4.44", features = [ "serde" ] }
|
chrono = { version = "0.4.45", features = [ "serde" ] }
|
||||||
log = "0.4.29"
|
log = "0.4.32"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize};
|
|||||||
use sqlx::{FromRow, PgPool};
|
use sqlx::{FromRow, PgPool};
|
||||||
use crate::models::origin::Origin;
|
use crate::models::origin::Origin;
|
||||||
use crate::models::variant::{load_article_variants, Variant};
|
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 sqlx::postgres::{PgArguments, PgQueryResult, PgRow};
|
||||||
use log::{debug, error, info};
|
use log::{debug, error, info};
|
||||||
use crate::models::unit::Unit;
|
use crate::models::unit::Unit;
|
||||||
@@ -83,7 +83,7 @@ pub async fn load_articles(pool: PgPool) -> Option<Vec<Article>> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
let res = sqlx::query(
|
let res = sqlx::query(
|
||||||
statement.as_str())
|
AssertSqlSafe(statement.as_str()))
|
||||||
.fetch_all(&pool).await;
|
.fetch_all(&pool).await;
|
||||||
|
|
||||||
let mut articles: Vec<Article> = Vec::new();
|
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);
|
args.add(id);
|
||||||
|
|
||||||
let res = sqlx::query_with(
|
let res = sqlx::query_with(
|
||||||
statement.as_str(), args)
|
AssertSqlSafe(statement.as_str()), args)
|
||||||
.fetch_one(&pool).await;
|
.fetch_one(&pool).await;
|
||||||
|
|
||||||
match res {
|
match res {
|
||||||
@@ -152,7 +152,7 @@ pub async fn insert_article(article: &Article, pool: PgPool) -> Option<Article>
|
|||||||
);
|
);
|
||||||
|
|
||||||
let res = sqlx::query_with(
|
let res = sqlx::query_with(
|
||||||
statement.as_str(),
|
AssertSqlSafe(statement.as_str()),
|
||||||
args)
|
args)
|
||||||
.fetch_one(&pool).await;
|
.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(
|
let res = sqlx::query_with(
|
||||||
statement.as_str(),
|
AssertSqlSafe(statement.as_str()),
|
||||||
args)
|
args)
|
||||||
.fetch_one(&pool).await;
|
.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<()> {
|
pub async fn delete_article(article_id: i64, pool: PgPool) -> Option<()> {
|
||||||
let result = sqlx::query(
|
let result = sqlx::query(
|
||||||
format!("DELETE FROM {} WHERE id = {}",
|
AssertSqlSafe(format!("DELETE FROM {} WHERE id = {}",
|
||||||
"article",
|
"article",
|
||||||
article_id
|
article_id
|
||||||
).as_str()
|
).as_str())
|
||||||
).execute(&pool).await;
|
).execute(&pool).await;
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use log::{error, info};
|
use log::{error, info};
|
||||||
use serde::{Deserialize, Serialize};
|
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};
|
use sqlx::postgres::{PgArguments, PgRow};
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, Clone, FromRow, Decode, Encode)]
|
#[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(
|
let res = sqlx::query(
|
||||||
statement.as_str())
|
AssertSqlSafe(statement.as_str()))
|
||||||
.fetch_all(&pool).await;
|
.fetch_all(&pool).await;
|
||||||
|
|
||||||
let mut labels: Vec<Label> = Vec::new();
|
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);
|
args.add(id);
|
||||||
|
|
||||||
let res = sqlx::query_with(
|
let res = sqlx::query_with(
|
||||||
statement.as_str(), args)
|
AssertSqlSafe(statement.as_str()), args)
|
||||||
.fetch_one(pool).await;
|
.fetch_one(pool).await;
|
||||||
|
|
||||||
match res {
|
match res {
|
||||||
@@ -79,7 +79,7 @@ pub async fn insert_label(label: &Label, pool: PgPool) -> Option<Label> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
let res = sqlx::query_with(
|
let res = sqlx::query_with(
|
||||||
statement.as_str(),
|
AssertSqlSafe(statement.as_str()),
|
||||||
args)
|
args)
|
||||||
.fetch_one(&pool).await;
|
.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(
|
let res = sqlx::query_with(
|
||||||
statement.as_str(),
|
AssertSqlSafe(statement.as_str()),
|
||||||
args)
|
args)
|
||||||
.fetch_one(&pool).await;
|
.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<()> {
|
pub async fn delete_label(label_id: i64, pool: PgPool) -> Option<()> {
|
||||||
let result = sqlx::query(
|
let result = sqlx::query(
|
||||||
format!("DELETE FROM {} WHERE id = {}",
|
AssertSqlSafe(format!("DELETE FROM {} WHERE id = {}",
|
||||||
"label",
|
"label",
|
||||||
label_id
|
label_id
|
||||||
).as_str()
|
).as_str())
|
||||||
).execute(&pool).await;
|
).execute(&pool).await;
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use log::{error, info};
|
use log::{error, info};
|
||||||
use serde::{Deserialize, Serialize};
|
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};
|
use sqlx::postgres::{PgArguments, PgRow};
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize, Clone, FromRow, Decode, Encode)]
|
#[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(
|
let res = sqlx::query(
|
||||||
statement.as_str())
|
AssertSqlSafe(statement.as_str()))
|
||||||
.fetch_one(pool).await;
|
.fetch_one(pool).await;
|
||||||
|
|
||||||
match res {
|
match res {
|
||||||
@@ -57,7 +57,7 @@ pub async fn update_settings(settings: &Settings, pool: PgPool) -> Option<Settin
|
|||||||
);
|
);
|
||||||
|
|
||||||
let res = sqlx::query_with(
|
let res = sqlx::query_with(
|
||||||
statement.as_str(),
|
AssertSqlSafe(statement.as_str()),
|
||||||
args)
|
args)
|
||||||
.fetch_one(&pool).await;
|
.fetch_one(&pool).await;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use log::{error, info};
|
use log::{error, info};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use sqlx::{Arguments, FromRow, PgPool, Row};
|
use sqlx::{Arguments, AssertSqlSafe, FromRow, PgPool, Row};
|
||||||
use sqlx::postgres::{PgArguments, PgRow};
|
use sqlx::postgres::{PgArguments, PgRow};
|
||||||
use crate::models::label::{load_label, Label};
|
use crate::models::label::{load_label, Label};
|
||||||
use crate::models::unit::Unit;
|
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);
|
args.add(article_id);
|
||||||
|
|
||||||
let res = sqlx::query_with(
|
let res = sqlx::query_with(
|
||||||
statement.as_str(), args)
|
AssertSqlSafe(statement.as_str()), args)
|
||||||
.fetch_all(pool).await;
|
.fetch_all(pool).await;
|
||||||
|
|
||||||
let mut variants: Vec<Variant> = Vec::new();
|
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(
|
let res = sqlx::query_with(
|
||||||
statement.as_str(),
|
AssertSqlSafe(statement.as_str()),
|
||||||
args)
|
args)
|
||||||
.fetch_one(&pool).await;
|
.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(
|
let res = sqlx::query_with(
|
||||||
statement.as_str(),
|
AssertSqlSafe(statement.as_str()),
|
||||||
args)
|
args)
|
||||||
.fetch_one(&pool).await;
|
.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<()> {
|
pub async fn delete_variant(variant_id: i64, pool: PgPool) -> Option<()> {
|
||||||
let result = sqlx::query(
|
let result = sqlx::query(
|
||||||
format!("DELETE FROM {} WHERE id = {}",
|
AssertSqlSafe(format!("DELETE FROM {} WHERE id = {}",
|
||||||
"variant",
|
"variant",
|
||||||
variant_id
|
variant_id
|
||||||
).as_str()
|
).as_str())
|
||||||
).execute(&pool).await;
|
).execute(&pool).await;
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
|
|||||||
Generated
+2668
-2153
File diff suppressed because it is too large
Load Diff
@@ -13,14 +13,14 @@
|
|||||||
"@fontsource/roboto": "5.2.10",
|
"@fontsource/roboto": "5.2.10",
|
||||||
"@mdi/font": "7.4.47",
|
"@mdi/font": "7.4.47",
|
||||||
"@pinia/nuxt": "0.11.3",
|
"@pinia/nuxt": "0.11.3",
|
||||||
"nuxt": "4.3.1",
|
"nuxt": "4.4.7",
|
||||||
"pinia": "3.0.4",
|
"pinia": "3.0.4",
|
||||||
"vue": "3.5.29",
|
"vue": "3.5.35",
|
||||||
"vue-router": "5.0.3",
|
"vue-router": "5.1.0",
|
||||||
"vuetify-pro-tiptap": "2.8.2"
|
"vuetify-pro-tiptap": "2.8.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"vite-plugin-vuetify": "2.1.3",
|
"vite-plugin-vuetify": "2.1.3",
|
||||||
"vuetify": "4.0.1"
|
"vuetify": "4.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-9
@@ -11,22 +11,22 @@ path = "src/main.rs"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
common = {path = "../common"}
|
common = {path = "../common"}
|
||||||
|
|
||||||
axum = "0.8.8"
|
axum = "0.8.9"
|
||||||
tokio = { version = "1.50.0", default-features = false, features = ["full"] }
|
tokio = { version = "1.52.3", default-features = false, features = ["full"] }
|
||||||
http = "1.4.0"
|
http = "1.4.1"
|
||||||
tower-http = {version = "0.6.8", features = ["cors"]}
|
tower-http = {version = "0.6.11", features = ["cors"]}
|
||||||
tracing = "=0.1.44"
|
tracing = "=0.1.44"
|
||||||
tracing-subscriber = "0.3.22"
|
tracing-subscriber = "0.3.23"
|
||||||
|
|
||||||
serde = { version = "1.0.228", features = ["derive"] }
|
serde = { version = "1.0.228", features = ["derive"] }
|
||||||
serde_json = "1.0.149"
|
serde_json = "1.0.150"
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
env_logger = "0.11.9"
|
env_logger = "0.11.10"
|
||||||
|
|
||||||
# Database
|
# 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.
|
# Etc.
|
||||||
dotenv = "0.15.0"
|
dotenv = "0.15.0"
|
||||||
chrono = { version = "0.4.44" }
|
chrono = { version = "0.4.45" }
|
||||||
|
|||||||
Reference in New Issue
Block a user