diff --git a/app/controllers/api/osuny/communication/websites/posts_controller.rb b/app/controllers/api/osuny/communication/websites/posts_controller.rb index c69a120e8192a429d48a61f082c9fa646b29d2ca..4f617e3ac58c96596fe00c9a0163ea1b7e007535 100644 --- a/app/controllers/api/osuny/communication/websites/posts_controller.rb +++ b/app/controllers/api/osuny/communication/websites/posts_controller.rb @@ -1,7 +1,7 @@ class Api::Osuny::Communication::Websites::PostsController < Api::Osuny::ApplicationController - skip_before_action :verify_authenticity_token, only: [:create] + skip_before_action :verify_authenticity_token, only: [:import] - def create + def import verify_app_token create_post import_blocks diff --git a/config/routes/api.rb b/config/routes/api.rb index f1f87885582c96138976478fe309e54c9cac69ae..ead34b0004c1ecce6cf71f63d11ec43fad9e05e3 100644 --- a/config/routes/api.rb +++ b/config/routes/api.rb @@ -6,7 +6,7 @@ namespace :api do namespace :communication do get 'websites' => 'websites#index' namespace :websites do - post ':website_id/posts' => 'posts#create' + post ':website_id/posts/import' => 'posts#import' end end get 'server' => 'server#index'