mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-01 19:37:29 -05:00
25 lines
567 B
Ruby
25 lines
567 B
Ruby
|
class UserActionsController < ApplicationController
|
||
|
def index
|
||
|
requires_parameters(:user_id)
|
||
|
per_chunk = 60
|
||
|
render :json => UserAction.stream(
|
||
|
user_id: params[:user_id].to_i,
|
||
|
offset: params[:offset],
|
||
|
limit: per_chunk,
|
||
|
action_types: (params[:filter] || "").split(","),
|
||
|
guardian: guardian,
|
||
|
ignore_private_messages: params[:filter] ? false : true
|
||
|
)
|
||
|
end
|
||
|
|
||
|
def show
|
||
|
requires_parameters(:id)
|
||
|
render :json => UserAction.stream_item(params[:id], guardian)
|
||
|
end
|
||
|
|
||
|
def private_messages
|
||
|
# todo
|
||
|
end
|
||
|
|
||
|
end
|