Skip to content

Commit

Permalink
Moving connection model definition test to proper place
Browse files Browse the repository at this point in the history
  • Loading branch information
sagojez committed May 6, 2024
1 parent 0f6b9cf commit 9851953
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
10 changes: 7 additions & 3 deletions api/src/routes/protected.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
endpoints::{
connection, event_access, events, metrics, oauth, passthrough, pipeline, transactions,
unified,
connection, connection_model_definition::test_connection_model_definition, event_access,
events, metrics, oauth, passthrough, pipeline, transactions, unified,
},
middleware::{
auth,
Expand All @@ -10,7 +10,7 @@ use crate::{
},
server::AppState,
};
use axum::{error_handling::HandleErrorLayer, middleware::from_fn_with_state, Router};
use axum::{error_handling::HandleErrorLayer, middleware::from_fn_with_state, routing::post, Router};
use http::HeaderName;
use std::{iter::once, sync::Arc};
use tower::{filter::FilterLayer, ServiceBuilder};
Expand All @@ -25,6 +25,10 @@ pub async fn get_router(state: &Arc<AppState>) -> Router<Arc<AppState>> {
.nest("/connections", connection::get_router())
.nest("/event-access", event_access::get_router())
.nest("/passthrough", passthrough::get_router())
.route(
"/connection-model-definitions/test/:id",
post(test_connection_model_definition),
)
.nest("/oauth", oauth::get_router())
.nest("/unified", unified::get_router())
.layer(TraceLayer::new_for_http())
Expand Down
7 changes: 1 addition & 6 deletions api/src/routes/public.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::{
endpoints::{
connection_definition, connection_model_definition::test_connection_model_definition,
connection_model_schema, connection_oauth_definition,
connection_definition, connection_model_schema, connection_oauth_definition,
event_access::create_event_access_for_new_user, openapi, read_cached,
},
middleware::jwt_auth::{self, JwtState},
Expand All @@ -25,10 +24,6 @@ pub fn get_router(state: &Arc<AppState>) -> Router<Arc<AppState>> {
jwt_auth::jwt_auth,
)),
)
.route(
"/connection-model-definitions/test/:id",
post(test_connection_model_definition),
)
.route(
"/connection-definitions",
get(read_cached::<connection_definition::CreateRequest, ConnectionDefinition>),
Expand Down

0 comments on commit 9851953

Please sign in to comment.