mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-04 00:03:02 +00:00
workspaces router
This commit is contained in:
@@ -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(),
|
||||
));
|
||||
}
|
||||
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user