Skip to content

Commit f0f1b03

Browse files
committed
Pull request fixes
1 parent 653fd64 commit f0f1b03

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

primitives/examples/analytics_response.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ fn main() {
1717
"time": 1659592800,
1818
"value": "100000000",
1919
"segment": "country"
20-
}],
21-
"totalPages": 1,
22-
"page": 0
20+
}]
2321
});
2422

2523
assert!(from_value::<AnalyticsResponse>(json).is_ok());

sentry/src/routes/analytics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use primitives::{
1919
};
2020

2121
/// GET `/v5/analytics` routes
22-
/// with query parameters: [`primitives::analytics::AnalyticsQuery`].
22+
/// Request query parameters: [`primitives::analytics::AnalyticsQuery`].
2323
///
2424
/// Response: [`primitives::sentry::AnalyticsResponse`]
2525
///

sentry/src/routes/campaign.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ pub async fn fetch_campaign_ids_for_channel(
144144

145145
/// POST `/v5/campaign`
146146
///
147-
/// Expected request body: [`CreateCampaign`](`primitives::sentry::campaign_create::CreateCampaign`)
147+
/// Request body (json): [`CreateCampaign`](`primitives::sentry::campaign_create::CreateCampaign`)
148148
///
149-
/// Expected response: [Campaign](`primitives::Campaign`)
149+
/// Response: [Campaign](`primitives::Campaign`)
150150
pub async fn create_campaign<C>(
151151
req: Request<Body>,
152152
app: &Application<C>,
@@ -374,10 +374,10 @@ pub mod update_campaign {
374374

375375
/// POST `/v5/campaign/:id` (auth required)
376376
///
377-
/// Request body is [`ModifyCampaign`](`primitives::sentry::campaign_modify::ModifyCampaign`)
378-
/// which consists of all the editable fields of the [`Campaign`]
377+
/// Request body (json): [`ModifyCampaign`](`primitives::sentry::campaign_modify::ModifyCampaign`)
378+
/// consists of all of the editable fields of the [`Campaign`]
379379
///
380-
/// Returns the updated [`Campaign`] serialized
380+
/// Response[`Campaign`](`primitives::Campaign`)
381381
///
382382
/// Ensures that the remaining funds for all campaigns <= total remaining funds (total deposited - total spent)
383383
///
@@ -642,9 +642,15 @@ pub mod insert_events {
642642

643643
/// POST `/v5/campaign/:id/events`
644644
///
645-
/// The expected request body is `Vec<[Event](primitives::Event)>`
645+
/// Request body (json):
646646
///
647-
/// The expected Response is [`SuccessResponse`](primitives::sentry::SuccessResponse)
647+
/// ```json
648+
/// {
649+
/// "events": [[`Event`](`primitives::Event`)]
650+
/// }
651+
/// ```
652+
///
653+
/// Response: [`SuccessResponse`](primitives::sentry::SuccessResponse)
648654
pub async fn handle_route<C: Locked + 'static>(
649655
req: Request<Body>,
650656
app: &Application<C>,

0 commit comments

Comments
 (0)