Class: Dato::PublishController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Dato::PublishController
- Defined in:
- app/controllers/dato/publish_controller.rb
Instance Method Summary collapse
Instance Method Details
#check ⇒ Object
17 18 19 20 21 |
# File 'app/controllers/dato/publish_controller.rb', line 17 def check if request.headers["Authorization"] != Dato::Config.publish_key render json: {message: "unauthorized"}, status: :unauthorized end end |
#create ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/controllers/dato/publish_controller.rb', line 9 def create Dato::Cache.clear! notify_success render json: {message: "ok"}, status: :ok end |