diff --git a/mono/Cargo.toml b/mono/Cargo.toml
index dd1404752..91f2393dc 100644
--- a/mono/Cargo.toml
+++ b/mono/Cargo.toml
@@ -20,7 +20,7 @@ taurus = { workspace = true }
anyhow = { workspace = true }
axum = { workspace = true }
-axum-server = { version = "0.7", features = ["tls-rustls"] }
+axum-server = { workspace = true, features = ["tls-rustls"] }
tower = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
diff --git a/mono/src/api/api_router.rs b/mono/src/api/api_router.rs
index 6d70c205a..5fc072e7b 100644
--- a/mono/src/api/api_router.rs
+++ b/mono/src/api/api_router.rs
@@ -8,7 +8,6 @@ use axum::{
use ceres::model::{
create_file::CreateFileInfo,
- publish_path::PublishPathInfo,
query::{BlobContentQuery, CodePreviewQuery},
tree::{LatestCommitInfo, TreeBriefItem, TreeCommitItem},
};
@@ -25,8 +24,7 @@ pub fn routers() -> Router
{
.route("/latest-commit", get(get_latest_commit))
.route("/tree/commit-info", get(get_tree_commit_info))
.route("/tree", get(get_tree_info))
- .route("/blob", get(get_blob_object))
- .route("/publish", post(publish_path_to_repo));
+ .route("/blob", get(get_blob_object));
Router::new().merge(router).merge(mr_router::routers())
}
@@ -117,20 +115,3 @@ async fn get_tree_commit_info(
};
Ok(Json(res))
}
-
-async fn publish_path_to_repo(
- state: State,
- Json(json): Json,
-) -> Result>, (StatusCode, String)> {
- ApiRequestEvent::notify(ApiType::Publish, &state.0.context.config);
- let res = state
- .api_handler(json.path.clone().into())
- .await
- .publish_path(json)
- .await;
- let res = match res {
- Ok(_) => CommonResult::success(None),
- Err(err) => CommonResult::failed(&err.to_string()),
- };
- Ok(Json(res))
-}
diff --git a/saturn/Cargo.toml b/saturn/Cargo.toml
index 4a9befd10..ae6a376e8 100644
--- a/saturn/Cargo.toml
+++ b/saturn/Cargo.toml
@@ -12,4 +12,4 @@ tracing-subscriber = { workspace = true }
thiserror = { workspace = true }
itertools = "0.13.0"
-cedar-policy = "3.2.1"
+cedar-policy = "3.3.0"
diff --git a/sql/postgres/pg_20240205__init.sql b/sql/postgres/pg_20240205__init.sql
index 2fe2ce0c3..60742b02f 100644
--- a/sql/postgres/pg_20240205__init.sql
+++ b/sql/postgres/pg_20240205__init.sql
@@ -267,3 +267,13 @@ CREATE TABLE IF NOT EXISTS "mq_storage" (
"create_time" TIMESTAMP NOT NULL,
"content" TEXT
);
+
+
+CREATE TABLE IF NOT EXISTS "ztm_path_mapping" (
+ "id" BIGINT PRIMARY KEY,
+ "alias" TEXT NOT NULL,
+ "repo_path" TEXT NOT NULL,
+ "created_at" TIMESTAMP NOT NULL,
+ "updated_at" TIMESTAMP NOT NULL,
+ CONSTRAINT uniq_alias UNIQUE (alias)
+);
\ No newline at end of file
diff --git a/sql/sqlite/sqlite_20240711_init.sql b/sql/sqlite/sqlite_20240711_init.sql
index 998a6fcff..3b23b132c 100644
--- a/sql/sqlite/sqlite_20240711_init.sql
+++ b/sql/sqlite/sqlite_20240711_init.sql
@@ -267,3 +267,12 @@ CREATE TABLE IF NOT EXISTS "mq_storage" (
"create_time" TIMESTAMP NOT NULL,
"content" TEXT
);
+
+CREATE TABLE IF NOT EXISTS "ztm_path_mapping" (
+ "id" BIGINT PRIMARY KEY,
+ "alias" TEXT NOT NULL,
+ "repo_path" TEXT NOT NULL,
+ "created_at" TIMESTAMP NOT NULL,
+ "updated_at" TIMESTAMP NOT NULL,
+ CONSTRAINT uniq_alias UNIQUE (alias)
+);
\ No newline at end of file