module Nesta::Plugin::ContentFocus::Routes
Public Class Methods
included(app)
click to toggle source
# File lib/nesta-plugin-contentfocus/routes.rb, line 5 def self.included(app) app.post "/contentfocus" do if !contentfocus_request? status 404 else if params["file"] Thread.new do Nesta::Plugin::ContentFocus::Client.cache_file(params["file"]) end else Thread.new do Nesta::Plugin::ContentFocus::Client.cache_files end end status 200 "" end end app.delete "/contentfocus" do if !contentfocus_request? status 404 else if params["file"] Thread.new do Nesta::Plugin::ContentFocus::Client.remove_file(params["file"]) end end status 200 "" end end end