Skip to content
Snippets Groups Projects
Unverified Commit ab9d776b authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

moved website to api/osuny/communication/websites/app_ctrl

parent 6208899f
No related branches found
No related tags found
No related merge requests found
......@@ -7,8 +7,4 @@ class Api::Osuny::ApplicationController < Api::ApplicationController
raise_403_unless @app
end
def website
@website ||= current_university.websites.find params[:website_id]
end
end
\ No newline at end of file
class Api::Osuny::Communication::Websites::ApplicationController < Api::Osuny::ApplicationController
skip_before_action :verify_authenticity_token, only: :import
before_action :verify_app_token, only: :import
def import
Importers::Api::Osuny::Communication::Website::Page.new university: current_university,
website: website,
params: params[:page]
render json: :ok
protected
def website
@website ||= current_university.websites.find params[:website_id]
end
end
class Api::Osuny::Communication::Websites::PagesController < Api::Osuny::ApplicationController
class Api::Osuny::Communication::Websites::PagesController < Api::Osuny::Communication::Websites::ApplicationController
skip_before_action :verify_authenticity_token, only: :import
before_action :verify_app_token, only: :import
......
class Api::Osuny::Communication::Websites::PostsController < Api::Osuny::ApplicationController
class Api::Osuny::Communication::Websites::PostsController < Api::Osuny::Communication::Websites::ApplicationController
skip_before_action :verify_authenticity_token, only: :import
before_action :verify_app_token, only: :import
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment