lib/rest-ftp-daemon/api/dashboard.rb in rest-ftp-daemon-0.435.2 vs lib/rest-ftp-daemon/api/dashboard.rb in rest-ftp-daemon-0.501.0
- old
+ new
@@ -6,10 +6,12 @@
module RestFtpDaemon
module API
class Dashboard < Grape::API
include BmcDaemonLib
+ content_type :html, 'application/html'
+ format :html
### HELPERS
helpers do
def log_context
{caller: "API::Dashboard"}
@@ -59,14 +61,14 @@
# Compile haml template
output = render :dashboard
# Send response
- env["api.format"] = :html
- format "html"
+ #env["api.format"] = :html
+ # format "html"
status 200
- content_type "text/html"
+ content_type "html"
body output
end
end
@@ -83,6 +85,6 @@
build_dashboard(params["filter"])
end
end
end
-end
+end
\ No newline at end of file