workspaces router

This commit is contained in:
Alex Petric
2025-02-05 11:42:51 -05:00
parent 35e95c6f64
commit bee9ed5acc
2 changed files with 25 additions and 0 deletions
+19
View File
@@ -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<String> {
return Err(Error::BadRequest(
"Deploy to is only available on enterprise".to_string(),
));
}
pub fn workspaces_list_available_teams_ids() -> Result<String> {
return Err(Error::BadRequest(
"Deploy to is only available on enterprise".to_string(),
));
}
pub fn connect_teams() -> Result<String> {
return Err(Error::BadRequest(
"Deploy to is only available on enterprise".to_string(),
));
}
+6
View File
@@ -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<String>,
pub teams_team_id: Option<String>,
pub teams_team_name: Option<String>,
pub slack_name: Option<String>,
pub slack_command_script: Option<String>,
pub teams_command_script: Option<String>,