require 'sanitize'
class ApiTextMessagesController < ApiController

  before_filter :api_signed_in_user

  respond_to :json

  def index
    @text_messages = TextMessage.index(params[:target_user_id], current_user.id, {:offset => params[:offset]})
    respond_with @text_messages, responder: ApiResponder, :status => 200
  end

  def create
    @text_message = TextMessage.create(params[:message], params[:target_user_id], current_user.id)
    respond_with_model(@text_message, new: true)
  end

end