| 75 | // Helper method to turn a class + a method to invoke into a UrlCallback |
| 76 | template<typename T, class F> |
| 77 | Webserver::UrlCallback MakeCallback(T* caller, const F& fnc) { |
| 78 | return [caller, fnc](const auto& req, auto* doc) { |
| 79 | (caller->*fnc)(req, doc); |
| 80 | }; |
| 81 | } |
| 82 | |
| 83 | // We expect the id to be passed as one parameter. Eg: 'query_id' or 'session_id'. |
| 84 | // Returns true if the id was present and valid; false otherwise. |