mirror of
http://ghproxy.cn/https://github.com/multunus/onemdm-server
synced 2025-12-06 02:04:57 +00:00
Create device controller with and API to create a device
- Turn of assets and helper generation automatically
This commit is contained in:
14
app/controllers/devices_controller.rb
Normal file
14
app/controllers/devices_controller.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class DevicesController < ApplicationController
|
||||
respond_to :json
|
||||
|
||||
def create
|
||||
device = Device.create(device_params)
|
||||
respond_with device, status: :created
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def device_params
|
||||
params.require(:device).permit(:model, :unique_id, :imei_number)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user