test_apps/grape/lib/ping/api.rb in sapience-0.2.8 vs test_apps/grape/lib/ping/api.rb in sapience-0.2.9
- old
+ new
@@ -6,9 +6,13 @@
class API < ::Grape::API
format :json
use Sapience::Extensions::Grape::Middleware::Logging, logger: Grape::API.logger
prefix :api
+ route :any, "*path" do
+ error!({ error: "No route found", status: 404 }, 404)
+ end
+
desc "Returns pong."
get :ping do
{ ping: "PONG" }
end
end