ahoy_panel 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e2f47b13518a0c8f17c1a4509ed25a955fe06ac86f434cfe3d5ab95d01cbdbe
4
- data.tar.gz: b1e0caedffcd619df4316819d791dd51e9c2506fdb1ca1a2d3f4646b9fb72cb8
3
+ metadata.gz: e3a7effd5f6be45e889bd51e8611e41ad9967b0cd0b7df55ae5367597e7d88fa
4
+ data.tar.gz: 8c201c51bc9030015a0c2801f725ec3dc82e20d26d2d963797dddaf33c2e2d69
5
5
  SHA512:
6
- metadata.gz: 3f9abf9a96621e47f2a2eced6becd0eb1158992b726a10083338fd8bdb423d726718f36a87474772ec16ffcc317ad60e94f460c1c1d91d88e6d4c8f68944bcf8
7
- data.tar.gz: 2b3b69ea18e1ea949850d1aceee3bfa0c217560549e8bad0a444f7d4e349a6630f445ef17cfa241834be8f1cec75474216caa6b657e0008a9cabe002e4729eb3
6
+ metadata.gz: b437d9ff9558489ec994b4a844b341c076a38b73787eb6834075f5856214aa81c914c2afbfef2eab31ae1e1ef9d2e3ea04df888a29829a3076638a487350cbad
7
+ data.tar.gz: 1c97d52ff4244ffc3f2289577ba673ab28bf58b00da5ca911faf2ac8ace4b94356bc701f8aca727d1c65ab612c4e6f2b5a1b8d1ab405964ee8f2c00a53a51732
@@ -14,6 +14,13 @@ module AhoyPanel
14
14
  render json: { visits: @visits, total_count: @page.present? ? @visits.total_count : nil }
15
15
  end
16
16
 
17
+ def show
18
+ @visit = ::Ahoy::Visit.find(params[:id])
19
+ @events = @visit.events
20
+
21
+ render json: { visit: @visit, events: @events }
22
+ end
23
+
17
24
  def all_time_dates
18
25
  start_date = ::Ahoy::Visit.order(started_at: :asc).first.started_at.to_date
19
26
  end_date = ::Ahoy::Visit.order(started_at: :desc).first.started_at.to_date
data/config/routes.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  AhoyPanel::Engine.routes.draw do
2
2
  get "all_time_dates", to: "visits#all_time_dates"
3
3
 
4
- resources :visits, only: [:index]
4
+ resources :visits, only: [:index, :show]
5
5
  end
@@ -1,3 +1,3 @@
1
1
  module AhoyPanel
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ahoy_panel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Jeon