akismet integration

This commit is contained in:
r888888888
2017-09-14 13:19:16 -07:00
parent d12f082f9a
commit b944b642b8
14 changed files with 90 additions and 3 deletions

View File

@@ -30,6 +30,11 @@ module Danbooru
config.x.git_hash = nil
end
if ENV["DANBOORU_RAKISMET_KEY"]
config.rakismet.key = ENV["DANBOORU_RAKISMET_KEY"]
config.rakismet.url = ENV["DANBOORU_RAKISMET_URL"]
end
config.after_initialize do
Rails.application.routes.default_url_options = {
host: Danbooru.config.hostname,

View File

@@ -117,6 +117,10 @@ Rails.application.routes.draw do
end
end
resources :dmails, :only => [:new, :create, :index, :show, :destroy] do
member do
post :spam
post :ham
end
collection do
post :mark_all_as_read
end