From 4f9b7432dd4d323ac6cc4efceeae2efaffe62e7d Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 27 Sep 2016 16:58:23 +0200 Subject: Fix #52 - Add API versioning (v1) --- app/controllers/api/v1/media_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 app/controllers/api/v1/media_controller.rb (limited to 'app/controllers/api/v1/media_controller.rb') diff --git a/app/controllers/api/v1/media_controller.rb b/app/controllers/api/v1/media_controller.rb new file mode 100644 index 000000000..4896534ad --- /dev/null +++ b/app/controllers/api/v1/media_controller.rb @@ -0,0 +1,8 @@ +class Api::V1::MediaController < ApiController + before_action :doorkeeper_authorize! + respond_to :json + + def create + @media = MediaAttachment.create!(account: current_user.account, file: params[:file]) + end +end -- cgit