From 146e5742ed06687c5a875ce7603982d30b6cd676 Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Mon, 18 Sep 2023 21:54:24 +0200
Subject: [PATCH] wip

---
 .../api/osuny/communication/websites/posts_controller.rb      | 4 ++--
 config/routes/api.rb                                          | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/controllers/api/osuny/communication/websites/posts_controller.rb b/app/controllers/api/osuny/communication/websites/posts_controller.rb
index c69a120e8..4f617e3ac 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 f1f878855..ead34b000 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'
-- 
GitLab