2014-02-13 06:51:23 +00:00
|
|
|
module Api
|
|
|
|
module V1
|
|
|
|
class ClientsController < Api::V1::BaseController
|
|
|
|
respond_to :json
|
|
|
|
|
|
|
|
def create
|
|
|
|
respond_with Client.create(client_params)
|
|
|
|
end
|
2014-02-18 09:06:53 +00:00
|
|
|
|
2014-02-13 06:51:23 +00:00
|
|
|
private
|
|
|
|
|
|
|
|
# Never trust parameters from the scary internet, only allow the white list through.
|
|
|
|
def client_params
|
2014-02-18 09:06:53 +00:00
|
|
|
params.require(:client).permit(:site_name, :site_token, :site_id, :university, :department, :email, :country, :url)
|
2014-02-13 06:51:23 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|