質問編集履歴
3
Presence.createをPersonalLog.createに変更
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
map = JSON.parse(params[:data]).with_indifferent_access
|
|
28
28
|
if map[:secret] == secret
|
|
29
29
|
map[:probing].each do |p|
|
|
30
|
-
|
|
30
|
+
PersonalLog.create(ap_mac: p[:ap_mac], client_mac: p[:client_mac],
|
|
31
31
|
last_seen: DateTime.parse(p[:last_seen]),
|
|
32
32
|
rssi: p[:rssi])
|
|
33
33
|
end
|
2
routes.rbの修正
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
```ruby
|
|
46
46
|
#config/routes.rb
|
|
47
47
|
Rails.application.routes.draw do
|
|
48
|
-
|
|
48
|
+
match 'personal_logs', :to => 'personal_logs#presenceapi', :as => :personal_logs, :via => [:get, :post]
|
|
49
49
|
end
|
|
50
50
|
```
|
1
修正
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
rails 'access denied'
|
|
38
38
|
end
|
|
39
39
|
else
|
|
40
|
-
render :text =>
|
|
40
|
+
render :text => MERAKI_VALIDATOR
|
|
41
41
|
end
|
|
42
42
|
end
|
|
43
43
|
end
|