class ApiDiagnosticsController < ApiController before_filter :api_signed_in_user respond_to :json def create @diagnostic = Diagnostic.new @diagnostic.type = params[:type] @diagnostic.data = params[:data].to_json if params[:data] @diagnostic.user = current_user @diagnostic.creator = Diagnostic::CLIENT @diagnostic.save respond_with_model(@diagnostic, new: true) end end