fix: cannot create duplicate apps and raw_apps

This commit is contained in:
Ruben Fiszel
2024-09-16 21:15:29 +02:00
parent 3e3b57f203
commit f864709ab2
3 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -609,7 +609,7 @@ async fn create_app(
}
let exists = sqlx::query_scalar!(
"SELECT EXISTS(SELECT 1 FROM raw_app WHERE path = $1 AND workspace_id = $2)",
"SELECT EXISTS(SELECT 1 FROM app WHERE path = $1 AND workspace_id = $2)",
&app.path,
w_id
)
+1 -1
View File
@@ -158,7 +158,7 @@ async fn create_app(
}
let exists = sqlx::query_scalar!(
"SELECT EXISTS(SELECT 1 FROM app WHERE path = $1 AND workspace_id = $2)",
"SELECT EXISTS(SELECT 1 FROM raw_app WHERE path = $1 AND workspace_id = $2)",
app.path,
w_id
)
-2
View File
@@ -43,8 +43,6 @@ use std::{
#[cfg(feature = "benchmark")]
use std::sync::atomic::AtomicUsize;
#[cfg(feature = "benchmark")]
use std::sync::atomic::AtomicUsize;
use uuid::Uuid;