Command: git diff Output: diff --git a/crates/router/src/routes/gsm.rs…
- User
Command: git diff Output: diff --git a/crates/router/src/routes/gsm.rs b/crates/router/src/routes/gsm.rs index 77a0cb0a6..c824eeb8f 100644 --- a/crates/router/src/routes/gsm.rs +++ b/crates/router/src/routes/gsm.rs @@ -159,3 +159,42 @@ pub async fn delete_gsm_rule( )) .await } + +/// Gsm - Create (v2) +/// +/// To create a Gsm Rule for v2 API +#[cfg(feature = "v2")] +#[utoipa::path(
- post,
- path = "/v2/gsm",
- request_body(
-
code
content = GsmCreateRequest, - ),
- responses(
-
code
(status = 200, description = "Gsm created", body = GsmResponse), -
code
(status = 400, description = "Missing Mandatory fields") - ),
- tag = "Gsm",
- operation_id = "Create Gsm Rule v2",
- security(("admin_api_key" = [])), +)] +#[instrument(skip_all, fields(flow = ?Flow::GsmRuleCreate))] +pub async fn create_gsm_rule_v2(
- state: web::Data,
- req: HttpRequest,
- json_payload: web::Json<gsm_api_types::GsmCreateRequest>, +) -> impl Responder {
- let payload = json_payload.into_inner();
- let flow = Flow::GsmRuleCreate;
- Box::pin(api::server_wrap(
-
code
flow, -
code
state.clone(), -
code
&req, -
code
payload, -
code
|state, _, payload, _| gsm::create_gsm_rule(state, payload), -
code
&auth::AdminApiAuth, -
code
api_locking::LockAction::NotApplicable, - ))
- .await +}
Assistant
<is_displaying_contents> true </is_displaying_contents>