このコミットが含まれているのは:
@@ -0,0 +1,17 @@
|
||||
class TheatreProgrammesController < ApplicationController
|
||||
def index
|
||||
limit = params[:limit].to_i
|
||||
limit = 100 if limit <= 0
|
||||
|
||||
position_gt = params[:position_gt].to_i
|
||||
position_gt = 0 if position_gt < 0
|
||||
|
||||
programmes = TheatreProgramme
|
||||
.where(theatre_id: params[:theatre_id])
|
||||
.where('position > ?', position_gt)
|
||||
.order(position: :desc).limit(100)
|
||||
.limit(limit)
|
||||
|
||||
render json: programmes.as_json(include: { post: PostRepr::BASE })
|
||||
end
|
||||
end
|
||||
新しい課題から参照
ユーザをブロックする