diff --git a/backend/.sqlx/query-23b67b5dece39ef7c736c67438cae95ed835f07ed3fa47ce437b005653335037.json b/backend/.sqlx/query-23b67b5dece39ef7c736c67438cae95ed835f07ed3fa47ce437b005653335037.json deleted file mode 100644 index d04637e421..0000000000 --- a/backend/.sqlx/query-23b67b5dece39ef7c736c67438cae95ed835f07ed3fa47ce437b005653335037.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "INSERT INTO ws_specific (workspace_id, item_kind, path) VALUES ($1, $2, $3) ON CONFLICT DO NOTHING", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Varchar", - "Varchar", - "Varchar" - ] - }, - "nullable": [] - }, - "hash": "23b67b5dece39ef7c736c67438cae95ed835f07ed3fa47ce437b005653335037" -} diff --git a/backend/.sqlx/query-fa04b3660f1f90c39c3d12f39c51df8f25a3bdae60aeaed313612cb858040c8d.json b/backend/.sqlx/query-fa04b3660f1f90c39c3d12f39c51df8f25a3bdae60aeaed313612cb858040c8d.json deleted file mode 100644 index 7f967b60a5..0000000000 --- a/backend/.sqlx/query-fa04b3660f1f90c39c3d12f39c51df8f25a3bdae60aeaed313612cb858040c8d.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "DELETE FROM ws_specific WHERE workspace_id = $1 AND item_kind = $2 AND path = $3", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "fa04b3660f1f90c39c3d12f39c51df8f25a3bdae60aeaed313612cb858040c8d" -} diff --git a/backend/windmill-api-workspaces/src/workspaces.rs b/backend/windmill-api-workspaces/src/workspaces.rs index a23aab99fd..a4e5b86b6d 100644 --- a/backend/windmill-api-workspaces/src/workspaces.rs +++ b/backend/windmill-api-workspaces/src/workspaces.rs @@ -178,7 +178,6 @@ pub fn workspaced_service() -> Router { .route("/cloud_quotas", get(get_cloud_quotas)) .route("/prune_versions", post(prune_versions)) .route("/list_ws_specific", get(list_ws_specific)) - .route("/set_ws_specific", post(set_ws_specific)) } pub fn global_service() -> Router { Router::new() @@ -6615,44 +6614,3 @@ async fn list_ws_specific( tx.commit().await?; Ok(Json(items)) } - -#[derive(Deserialize)] -struct SetWsSpecific { - item_kind: String, - path: String, - ws_specific: bool, -} - -async fn set_ws_specific( - authed: ApiAuthed, - Extension(user_db): Extension, - Path(w_id): Path, - Json(req): Json, -) -> Result { - require_admin(authed.is_admin, &authed.username)?; - let mut tx = user_db.begin(&authed).await?; - if req.ws_specific { - sqlx::query!( - "INSERT INTO ws_specific (workspace_id, item_kind, path) VALUES ($1, $2, $3) ON CONFLICT DO NOTHING", - w_id, - req.item_kind, - req.path, - ) - .execute(&mut *tx) - .await?; - } else { - sqlx::query!( - "DELETE FROM ws_specific WHERE workspace_id = $1 AND item_kind = $2 AND path = $3", - w_id, - req.item_kind, - req.path, - ) - .execute(&mut *tx) - .await?; - } - tx.commit().await?; - Ok(format!( - "ws_specific set to {} for {} {}", - req.ws_specific, req.item_kind, req.path - )) -} diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 81f6669c4b..3cd4b7d520 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -5603,39 +5603,6 @@ paths: - item_kind - path - /w/{workspace}/workspaces/set_ws_specific: - post: - summary: set or unset an item as workspace-specific - operationId: setWsSpecific - tags: - - workspace - parameters: - - $ref: "#/components/parameters/WorkspaceId" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - item_kind: - type: string - path: - type: string - ws_specific: - type: boolean - required: - - item_kind - - path - - ws_specific - responses: - "200": - description: ws_specific updated - content: - text/plain: - schema: - type: string - /w/{workspace}/workspaces/public_app_rate_limit: post: summary: Set public app rate limit for this workspace diff --git a/rust-client/src/client.rs b/rust-client/src/client.rs index 23c1b5b065..3b5294583b 100644 --- a/rust-client/src/client.rs +++ b/rust-client/src/client.rs @@ -242,6 +242,7 @@ impl Windmill { is_oauth: None, expires_at: None, labels: None, + ws_specific: None, }, None, ) @@ -257,6 +258,7 @@ impl Windmill { is_secret: None, description: None, labels: None, + ws_specific: None, }, None, ) @@ -403,6 +405,7 @@ impl Windmill { description: None, resource_type: resource_type.to_owned(), labels: None, + ws_specific: None, }, // Some(true), None, @@ -419,6 +422,7 @@ impl Windmill { value: Some(value), resource_type: Some(resource_type.to_owned()), labels: None, + ws_specific: None, }, ) .await?;