dev_video
cxt 5 years ago
parent 2967891321
commit 082bf573f8

@ -39,6 +39,13 @@ class Users::VideosController < Users::BaseController
@videos = paginate videos @videos = paginate videos
end end
def get_video_data
start_time = params[:start_time].to_time.utc.strftime('%Y-%m-%dT%H:%M:%SZ')
end_time = params[:end_time].to_time.utc.strftime('%Y-%m-%dT%H:%M:%SZ')
result = AliyunVod::Service.video_data(current_video.uuid, start_time, end_time)
render :json => {data: result}
end
def batch_publish def batch_publish
Videos::BatchPublishService.call(observed_user, batch_publish_params) Videos::BatchPublishService.call(observed_user, batch_publish_params)
render_ok render_ok

@ -197,6 +197,9 @@ Rails.application.routes.draw do
post :batch_publish post :batch_publish
post :cancel post :cancel
end end
member do
get :get_video_data
end
end end
resource :video_auths, only: [:create, :update] resource :video_auths, only: [:create, :update]
end end

Loading…
Cancel
Save