Skip to content

Commit

Permalink
fix eval
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Jan 15, 2025
1 parent 702f2d5 commit 734d95c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions exe/generate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,14 @@ int generate(int ac, char** av) {
"start not a location");
utl::verify(std::holds_alternative<n::location_idx_t>(q->dest_),
"dest not a location");
utl::verify(std::holds_alternative<n::unixtime_t>(q->q_.start_time_),
"start time not time point");
utl::verify(
std::holds_alternative<n::interval<n::unixtime_t>>(q->q_.start_time_),
"start time not time point");
auto p = api::plan_params{};
p.fromPlace_ =
d.tags_->id(*d.tt_, std::get<n::location_idx_t>(q->start_));
p.toPlace_ = d.tags_->id(*d.tt_, std::get<n::location_idx_t>(q->dest_));
p.time_ = std::get<n::unixtime_t>(q->q_.start_time_);
p.time_ = std::get<n::interval<n::unixtime_t>>(q->q_.start_time_).from_;
out << p.to_url("/api/v1/plan") << "\n";
}
}
Expand Down

0 comments on commit 734d95c

Please sign in to comment.