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