mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-20 08:34:18 +01:00
Environment dropdown and actions
This commit is contained in:
@@ -254,6 +254,7 @@ pub async fn create_environment(
|
||||
|
||||
pub async fn update_environment(
|
||||
id: &str,
|
||||
name: &str,
|
||||
data: HashMap<String, JsonValue>,
|
||||
pool: &Pool<Sqlite>,
|
||||
) -> Result<Environment, sqlx::Error> {
|
||||
@@ -262,9 +263,10 @@ pub async fn update_environment(
|
||||
sqlx::query!(
|
||||
r#"
|
||||
UPDATE environments
|
||||
SET (data, updated_at) = (?, CURRENT_TIMESTAMP)
|
||||
SET (name, data, updated_at) = (?, ?, CURRENT_TIMESTAMP)
|
||||
WHERE id = ?;
|
||||
"#,
|
||||
name,
|
||||
json_data,
|
||||
id,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user