Class: Eivid::VideosController
- Inherits:
-
ApplicationController
- Object
- API::BaseController
- ApplicationController
- Eivid::VideosController
- Defined in:
- app/controllers/eivid/videos_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
32 33 34 35 |
# File 'app/controllers/eivid/videos_controller.rb', line 32 def destroy record = RequestService.destroy(video: @video) render json: record end |
#index ⇒ Object
24 25 26 |
# File 'app/controllers/eivid/videos_controller.rb', line 24 def index render json: Video.all end |
#owner_videos ⇒ Object
20 21 22 |
# File 'app/controllers/eivid/videos_controller.rb', line 20 def owner_videos render json: @owner.videos end |
#show ⇒ Object
28 29 30 |
# File 'app/controllers/eivid/videos_controller.rb', line 28 def show render json: @video end |
#upload_video ⇒ Object
15 16 17 18 |
# File 'app/controllers/eivid/videos_controller.rb', line 15 def upload_video record = UploadService.upload(owner: @owner, user: @user, video_file: video_params["video_file"], video_title: video_title) render json: record end |