Add catchall route
This commit is contained in:
parent
08bd3462b8
commit
5f85e772d8
@ -79,4 +79,12 @@ void setRoutes(crow::SimpleApp& app){
|
|||||||
return ret;
|
return ret;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//catchall route
|
||||||
|
CROW_CATCHALL_ROUTE(app)([](){
|
||||||
|
crow::json::wvalue ret;
|
||||||
|
ret["message"] = "Route not understood. Please refer to the documentation";
|
||||||
|
|
||||||
|
return crow::response(404, ret.dump());
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user