Skip to content

Commit 74f8596

Browse files
committed
require project parameter
1 parent ccef59d commit 74f8596

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/api/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ pub struct FetchEventsOptions<'a> {
14421442
/// Fields to include in the response
14431443
pub fields: &'a [&'a str],
14441444
/// Project ID to filter events by
1445-
pub project_id: Option<&'a str>,
1445+
pub project_id: &'a str,
14461446
/// Cursor for pagination
14471447
pub cursor: Option<&'a str>,
14481448
/// Query string to filter events
@@ -1468,9 +1468,7 @@ impl<'a> FetchEventsOptions<'a> {
14681468
params.push(format!("cursor={}", QueryArg(cursor)));
14691469
}
14701470

1471-
if let Some(project_id) = self.project_id {
1472-
params.push(format!("project={}", QueryArg(project_id)));
1473-
}
1471+
params.push(format!("project={}", QueryArg(self.project_id)));
14741472

14751473
if let Some(query) = self.query {
14761474
params.push(format!("query={}", QueryArg(query)));

src/commands/logs/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ fn execute_single_fetch(
9090
let options = FetchEventsOptions {
9191
dataset: Dataset::Logs,
9292
fields,
93-
project_id: Some(project),
93+
project_id: project,
9494
cursor: None,
9595
query,
9696
per_page: Some(args.max_rows),

0 commit comments

Comments
 (0)