diff options
| author | mo khan <mo@mokhan.ca> | 2015-02-09 19:43:03 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-02-09 19:43:03 -0700 |
| commit | 594d37bb40f3e3e0f15553383cf2a305d4d6742e (patch) | |
| tree | 6236972f334d3ad778fbd51948d9635ae1226936 /app/controllers/api/agents_controller.rb | |
| parent | 72a1483c8f546fae6c93dcdf91cfd47c37bc2f90 (diff) | |
extract api.
Diffstat (limited to 'app/controllers/api/agents_controller.rb')
| -rw-r--r-- | app/controllers/api/agents_controller.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/controllers/api/agents_controller.rb b/app/controllers/api/agents_controller.rb new file mode 100644 index 0000000..16174b1 --- /dev/null +++ b/app/controllers/api/agents_controller.rb @@ -0,0 +1,15 @@ +module Api + class AgentsController < ApplicationController + #before_action do + #request.format = :json + #end + + def create + @agent = Agent.create!(agent_params) + end + + def agent_params + params.require(:agent).permit(:hostname) + end + end +end |
