diff options
Diffstat (limited to 'app/controllers/api/agents_controller.rb')
| -rw-r--r-- | app/controllers/api/agents_controller.rb | 11 |
1 files changed, 11 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..a7307f0 --- /dev/null +++ b/app/controllers/api/agents_controller.rb @@ -0,0 +1,11 @@ +module Api + class AgentsController < ApiController + def create + @agent = Agent.create!(agent_params) + end + + def agent_params + params.require(:agent).permit(:hostname) + end + end +end |
