fix: remove set_ws_specific endpoint and fix rust-client compilation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Diego Imbert
2026-04-15 12:34:01 +02:00
parent 3199501670
commit fbf9e6da20
5 changed files with 4 additions and 107 deletions

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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<UserDB>,
Path(w_id): Path<String>,
Json(req): Json<SetWsSpecific>,
) -> Result<String> {
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
))
}

View File

@@ -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

View File

@@ -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?;