diff options
Diffstat (limited to 'server/src/http/handler.cpp')
| -rw-r--r-- | server/src/http/handler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/http/handler.cpp b/server/src/http/handler.cpp index 580e3f5..948ab62 100644 --- a/server/src/http/handler.cpp +++ b/server/src/http/handler.cpp | |||
| @@ -190,7 +190,7 @@ auto handler::handle_process_gpx(l0_ctx ctx, core::readable_request r) | |||
| 190 | 190 | ||
| 191 | // TODO: catch handler exceptions and return 500 when raised? | 191 | // TODO: catch handler exceptions and return 500 when raised? |
| 192 | // (keep-alive depends on whether whole request was read) | 192 | // (keep-alive depends on whether whole request was read) |
| 193 | auto mres = inner_.process_gpx( | 193 | auto mres = inner_->process_gpx( |
| 194 | ctx.trace_id, std::move(gpx_file), | 194 | ctx.trace_id, std::move(gpx_file), |
| 195 | time::period_seq<std::chrono::minutes>{cp}); | 195 | time::period_seq<std::chrono::minutes>{cp}); |
| 196 | if (!mres) | 196 | if (!mres) |
| @@ -216,7 +216,7 @@ auto handler::handle_sysinfo(l0_ctx ctx, core::readable_request r) | |||
| 216 | -> net::awaitable<core::presponse> | 216 | -> net::awaitable<core::presponse> |
| 217 | { | 217 | { |
| 218 | auto req = co_await core::read_empty_request(ctx, std::move(r)); | 218 | auto req = co_await core::read_empty_request(ctx, std::move(r)); |
| 219 | auto info = inner_.sysinfo(); | 219 | auto info = inner_->sysinfo(); |
| 220 | 220 | ||
| 221 | auto rsp = core::make_rsp<bhttp::string_body>( | 221 | auto rsp = core::make_rsp<bhttp::string_body>( |
| 222 | bhttp::status::ok, core::keep_alive{true}); | 222 | bhttp::status::ok, core::keep_alive{true}); |
| @@ -306,7 +306,7 @@ auto handler::handle_rwgps_webhook(l0_ctx ctx, core::readable_request r) | |||
| 306 | } | 306 | } |
| 307 | 307 | ||
| 308 | // TODO: handle conversion failure gracefully | 308 | // TODO: handle conversion failure gracefully |
| 309 | inner_.rwgps_webhook( | 309 | inner_->rwgps_webhook( |
| 310 | *mrwgps_ts, json::value_to<rwgps::webhook_request>(req.body().get())); | 310 | *mrwgps_ts, json::value_to<rwgps::webhook_request>(req.body().get())); |
| 311 | 311 | ||
| 312 | auto rsp = core::make_rsp<bhttp::empty_body>( | 312 | auto rsp = core::make_rsp<bhttp::empty_body>( |
| @@ -316,7 +316,7 @@ auto handler::handle_rwgps_webhook(l0_ctx ctx, core::readable_request r) | |||
| 316 | } | 316 | } |
| 317 | 317 | ||
| 318 | handler::handler( | 318 | handler::handler( |
| 319 | log::logger const& l, api::handler&& inner, | 319 | log::logger const& l, std::shared_ptr<api::handler> inner, |
| 320 | std::shared_ptr<rwgps::credentials> rwgps_creds) | 320 | std::shared_ptr<rwgps::credentials> rwgps_creds) |
| 321 | : l_{l.sub("handler")}, inner_{std::move(inner)}, | 321 | : l_{l.sub("handler")}, inner_{std::move(inner)}, |
| 322 | rwgps_creds_{std::move(rwgps_creds)} | 322 | rwgps_creds_{std::move(rwgps_creds)} |