diff --git a/backend/windmill-api/src/teams_ee.rs b/backend/windmill-api/src/teams_ee.rs index 2933d4214c..45ae1e3267 100644 --- a/backend/windmill-api/src/teams_ee.rs +++ b/backend/windmill-api/src/teams_ee.rs @@ -1,5 +1,24 @@ use axum::Router; +use windmill_common::error::{Error, Result}; pub fn teams_service() -> Router { Router::new() +} + +pub fn edit_teams_command() -> Result { + return Err(Error::BadRequest( + "Deploy to is only available on enterprise".to_string(), + )); +} + +pub fn workspaces_list_available_teams_ids() -> Result { + return Err(Error::BadRequest( + "Deploy to is only available on enterprise".to_string(), + )); +} + +pub fn connect_teams() -> Result { + return Err(Error::BadRequest( + "Deploy to is only available on enterprise".to_string(), + )); } \ No newline at end of file diff --git a/backend/windmill-api/src/workspaces.rs b/backend/windmill-api/src/workspaces.rs index 9c0cbc1922..faaacb0ddb 100644 --- a/backend/windmill-api/src/workspaces.rs +++ b/backend/windmill-api/src/workspaces.rs @@ -58,6 +58,8 @@ use sqlx::{FromRow, Postgres, Transaction}; use windmill_common::oauth2::InstanceEvent; use windmill_common::utils::not_found_if_none; +use crate::teams_ee::{edit_teams_command, workspaces_list_available_teams_ids, connect_teams}; + lazy_static::lazy_static! { static ref WORKSPACE_KEY_REGEXP: Regex = Regex::new("^[a-zA-Z0-9]{64}$").unwrap(); } @@ -73,6 +75,9 @@ pub fn workspaced_service() -> Router { .route("/get_settings", get(get_settings)) .route("/get_deploy_to", get(get_deploy_to)) .route("/edit_slack_command", post(edit_slack_command)) + .route("/edit_teams_command", post(edit_teams_command)) + .route("/available_teams_ids", get(workspaces_list_available_teams_ids)) + .route("/connect_teams", post(connect_teams)) .route( "/run_slack_message_test_job", post(run_slack_message_test_job), @@ -167,6 +172,7 @@ pub struct WorkspaceSettings { pub workspace_id: String, pub slack_team_id: Option, pub teams_team_id: Option, + pub teams_team_name: Option, pub slack_name: Option, pub slack_command_script: Option, pub teams_command_script: Option,