Skip to content

Commit

Permalink
improved nigiri routes
Browse files Browse the repository at this point in the history
  • Loading branch information
carstenhagelgans committed Nov 7, 2023
1 parent 456c9f3 commit cd2baab
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions modules/nigiri/src/nigiri.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,15 @@ void nigiri::init(motis::module::registry& reg) {
}
}

if (impl_->tt_->get()->profiles_.empty()) {
reg.register_op("/nigiri",
[&](mm::msg_ptr const& msg) {
return route(impl_->tags_, **impl_->tt_,
impl_->get_rtt().get(), n::profile_idx_t{0U},
msg);
},
{});
} else {
reg.register_op("/nigiri",
[&](mm::msg_ptr const& msg) {
return route(impl_->tags_, **impl_->tt_,
impl_->get_rtt().get(), n::profile_idx_t{0U},
msg);
},
{});

if (!impl_->tt_->get()->profiles_.empty()) {
for (auto const& [prf_name, prf_idx] : impl_->tt_->get()->profiles_) {
reg.register_op(fmt::format("/nigiri/{}", prf_name),
[&](mm::msg_ptr const& msg) {
Expand Down

0 comments on commit cd2baab

Please sign in to comment.