mirror of
http://ghproxy.cn/https://github.com/multunus/onemdm-server
synced 2025-12-06 10:14:59 +00:00
Heartbeat API with device token authentication
This commit is contained in:
10
app/controllers/heartbeats_controller.rb
Normal file
10
app/controllers/heartbeats_controller.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class HeartbeatsController < ApplicationController
|
||||
before_action :authenticate_device
|
||||
respond_to :json
|
||||
|
||||
def create
|
||||
heartbeat = Heartbeat.create(device: @device)
|
||||
render json: { next_heartbeat_time: heartbeat.next_heartbeat_time },
|
||||
status: :created
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user