ishapi 0.1.8.131 → 0.1.8.136

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: f1802659d2e8c6ce8924c5e5645314e9c235d548f967b1c98041b80c22b5daf9
4
- data.tar.gz: 2fb33453eb17bae2775ea7a2b3f8988bb044d853f5df16e3ce134c77a0d1725d
3
+ metadata.gz: 5339296869058b6d82a54995cceebfd6006e45050a1964efeae15decc76ba82d
4
+ data.tar.gz: d46ff74f622cee0e0f133305f3253a23ea9bbcf321bcc7489f59dbb3a21f23d5
5
5
  SHA512:
6
- metadata.gz: dc18bdfec85c2e6e3847f9936999f35a47df4e6a1bf1d791d7c1bd6cd55334ca7a0a4a10d12a1a9bf001cbcd6f0107fceb0c8ccd235717f86a254afae85c370d
7
- data.tar.gz: bc6daf89813d973285525d8f8664408a1f97f7b07ab136c709f560f1de6c3627926120679bee7a42180cd9ce9707a1b34b2274ca9d27a9daa8c5702f204afe24
6
+ metadata.gz: 13fac7d4bf3e24d386c2f192cfa2cfdf3210e51d77f2a9df305a15ffd67b2c8a2e65a5cd85eff0b368df4b0501f1352fc3d7ea9b4760c39c998b073908796e22
7
+ data.tar.gz: ca09ad85b5a644461a68cd2aa80192cabcfd267f9f4fc3a5eb6e74cf44ad790375a163192d43bc38b4689a7c410eb3c66b3c7be9d7a10591e3a4cefccfc6a66c
data/README.md CHANGED
@@ -1,12 +1,19 @@
1
1
 
2
2
  # Develop
3
3
 
4
+ -=----- 20201228
5
+
6
+ Expects params[:jwtToken]
7
+ no... expects params[:accessToken]
8
+ somehow expects params[:jwt_token] ?
9
+
4
10
  # Test
5
11
 
6
12
  cd test/dummy
7
13
  be rspec spec
8
14
 
9
15
  # Install
16
+
10
17
  bundle
11
18
  gem build ishapi.gemspec
12
19
 
@@ -6,39 +6,46 @@ module Ishapi
6
6
  layout :false
7
7
 
8
8
  # before_action :check_profile, except: [ :test ]
9
- before_action :set_current_ability
9
+ # before_action :set_current_ability
10
10
 
11
- check_authorization
11
+ check_authorization except: [ :long_term_token ]
12
12
  skip_before_action :verify_authenticity_token
13
13
 
14
14
  def test
15
15
  end
16
16
 
17
17
  def long_term_token
18
- authorize! :long_term_token, ::Ishapi
19
-
20
18
  accessToken = request.headers[:accessToken]
21
19
  accessToken ||= params[:accessToken]
22
20
 
23
21
  params['domain'] = 'tgm.piousbox.com'
24
22
 
25
- response = HTTParty.get "https://graph.facebook.com/v5.0/oauth/access_token?grant_type=fb_exchange_token&" +
23
+ response = ::HTTParty.get "https://graph.facebook.com/v5.0/oauth/access_token?grant_type=fb_exchange_token&" +
26
24
  "client_id=#{FB[params['domain']][:app]}&client_secret=#{FB[params['domain']][:secret]}&" +
27
25
  "fb_exchange_token=#{accessToken}"
28
26
  j = JSON.parse response.body
29
- puts! j, 'fb response'
30
- @long_term_token = j['access_token']
31
-
32
- # get user email
27
+ @long_term_token = j['access_token']
33
28
  @graph = Koala::Facebook::API.new( accessToken )
34
29
  @me = @graph.get_object( 'me', :fields => 'email' )
35
30
  @current_user = User.where( :email => @me['email'] ).first
36
- @profile = @current_user.profile
31
+
32
+ puts! @current_user, '#long_term_token @current_user'
37
33
 
38
34
  # send the jwt to client
39
- @jwt_token = encode(user_id: @current_user.id)
35
+ @jwt_token = encode(user_id: @current_user.id.to_s)
36
+
37
+ render json: {
38
+ email: @current_user.email,
39
+ jwt_token: @jwt_token,
40
+ long_term_token: @long_term_token,
41
+ n_unlocks: @current_user.profile.n_unlocks,
42
+ }
43
+ end
40
44
 
41
- render json: { long_term_token: @long_term_token, jwt_token: @jwt_token }
45
+ def home
46
+ authorize! :welcome_home, Ishapi
47
+ render :json => { :status => :ok, :message => 'Ishapi::ApiController.home',
48
+ :n_reports => Report.count, :n_cities => City.count }
42
49
  end
43
50
 
44
51
  #
@@ -47,6 +54,8 @@ module Ishapi
47
54
  private
48
55
 
49
56
  def append_long_term_token
57
+ puts! nil, 'append_long_term_token'
58
+
50
59
  if @long_term_token
51
60
  response.body = JSON.parse(response.body).merge({ long_term_token: @long_term_token }).to_json
52
61
  end
@@ -70,10 +79,10 @@ module Ishapi
70
79
  end
71
80
  end
72
81
  end
82
+
73
83
  ## Does not crap out if accessToken is missing
74
84
  def soft_check_long_term_token
75
85
  check_long_term_token soft=true
76
- # puts! @profile, 'soft_check_long_term_token() profile'
77
86
  end
78
87
 
79
88
  def check_multiprofile provider = 'google'
@@ -134,19 +143,29 @@ module Ishapi
134
143
  elsif 'jwt' == provider
135
144
  decoded = decode(params[:jwt_token])
136
145
  puts! decoded, 'decoded'
137
- @current_user = User.find decoded[:user_id]
138
-
146
+ @current_user = User.find decoded['user_id']
139
147
  else
140
148
  puts! 'check_multiprofile(): no access token'
141
149
  raise "ww1 - not implemented"
142
150
  end
143
151
 
152
+ # @TODO: refactor [ref-5]
144
153
  sign_in @current_user, scope: :user
145
154
  set_current_ability
146
155
  end
147
156
 
157
+
158
+
159
+ # same as check_profile but doesn't error out when jwt_token is missing
160
+ def check_profile_optionally
161
+ if !params[:jwt_token]
162
+ @current_user = User.new profile: Profile.new
163
+ else
164
+ check_profile
165
+ end
166
+ end
167
+
148
168
  # this doesn't generate long-lived token, doesn't update user_profile
149
- # this is only for facebook now
150
169
  def check_profile
151
170
  puts! params, 'params'
152
171
 
@@ -240,6 +259,14 @@ module Ishapi
240
259
  puts a.inspect
241
260
  end
242
261
 
262
+ # jwt
263
+ def check_jwt
264
+ decoded = decode(params[:jwt_token])
265
+ puts! decoded, 'decoded'
266
+ @current_user = User.find decoded['user_id']
267
+ set_current_ability
268
+ end
269
+
243
270
  # jwt
244
271
  def encode(payload, exp = 2.hours.from_now)
245
272
  payload[:exp] = exp.to_i
@@ -3,7 +3,8 @@ require_dependency "ishapi/application_controller"
3
3
  module Ishapi
4
4
  class GalleriesController < ApplicationController
5
5
 
6
- before_action :soft_check_long_term_token, only: [ :show ]
6
+ # before_action :soft_check_long_term_token, only: [ :show ]
7
+ before_action :check_jwt
7
8
 
8
9
  def index
9
10
  @galleries = Gallery.all
@@ -21,7 +21,7 @@ module Ishapi
21
21
  :amount => params[:amount],
22
22
  :currency => 'usd',
23
23
  :source => params[:stripeToken],
24
- :destination => {
24
+ :destination => {
25
25
  :account => acct,
26
26
  }
27
27
  )
@@ -46,7 +46,7 @@ module Ishapi
46
46
  def do_purchase
47
47
  authorize! :do_purchase, ::Gameui
48
48
  item = params[:className].constantize.find_by_slug( params[:slug] )
49
-
49
+
50
50
  raise 'no such item' if !item
51
51
  raise 'too little funds' if @profile.n_stars < item.premium_tier
52
52
 
@@ -0,0 +1,12 @@
1
+
2
+ class Ishapi::My::GalleriesController < Ishapi::My::MyController
3
+
4
+ ## expects params[:jwt_token]
5
+ def index
6
+ authorize! :my_index, Gallery
7
+ @galleries = @current_user.profile.galleries.unscoped.where( is_trash: false ).order_by( created_at: :desc ).limit(20)
8
+ render 'ishapi/galleries/index'
9
+ end
10
+
11
+ end
12
+
@@ -4,15 +4,18 @@ module Ishapi
4
4
  class MyController < Ishapi::ApplicationController
5
5
 
6
6
  # before_action :set_profile # this is DoS on FB - disabled
7
- before_action :do_login
7
+ # before_action :do_login
8
+ before_action :check_profile
9
+
10
+ def account
11
+ @profile = current_user.profile
12
+ authorize! :show, @profile
13
+ end
8
14
 
9
15
  private
10
16
 
11
17
  def do_login
12
- puts! params, 'params'
13
-
14
18
  token = decode(params[:jwtToken])
15
- puts! token, 'token'
16
19
  @current_user = User.find(token["user_id"])
17
20
  end
18
21
 
@@ -5,9 +5,7 @@ module Ishapi
5
5
 
6
6
  def index
7
7
  authorize! :my_index, Video
8
- puts! @current_user, 'current_user'
9
-
10
- @videos = @current_user.profile.videos.unscoped.where( is_trash: false ).limit(20)
8
+ @videos = @current_user.profile.videos.unscoped.where( is_trash: false ).order_by( created_at: :desc ).limit(20)
11
9
  end
12
10
 
13
11
  end
@@ -2,6 +2,12 @@ require_dependency "ishapi/application_controller"
2
2
  module Ishapi
3
3
  class PaymentsController < ApplicationController
4
4
 
5
+ before_action :check_profile, only: %i| create2 unlock |
6
+
7
+ ##
8
+ ## this is for invoices on wasya.co, isn't it?
9
+ ## 20200712
10
+ ##
5
11
  def create
6
12
  authorize! :open_permission, ::Ishapi
7
13
  begin
@@ -18,11 +24,10 @@ module Ishapi
18
24
  :amount => amount_cents,
19
25
  :currency => 'usd',
20
26
  :source => params[:token][:id],
21
- :destination => {
27
+ :destination => {
22
28
  :account => acct,
23
29
  }
24
30
  )
25
- # puts! charge, 'charge'
26
31
 
27
32
  payment.charge = JSON.parse( charge.to_json )
28
33
  if payment.save
@@ -36,6 +41,73 @@ module Ishapi
36
41
  end
37
42
  end
38
43
 
44
+ ## This is for guyd _vp_ 20200721
45
+ def create2
46
+ authorize! :create, ::Ish::Payment
47
+
48
+ begin
49
+ amount_cents = 503 # @TODO: change
50
+
51
+ ::Stripe.api_key = STRIPE_SK
52
+ intent = Stripe::PaymentIntent.create({
53
+ amount: amount_cents,
54
+ currency: 'usd',
55
+ metadata: { integration_check: "accept_a_payment" },
56
+ })
57
+
58
+ payment = Ish::Payment.create!(
59
+ client_secret: intent.client_secret,
60
+ email: @current_user.email,
61
+ payment_intent_id: intent.id,
62
+ profile_id: @current_user.profile.id )
63
+
64
+ render json: { client_secret: intent.client_secret }
65
+ rescue Mongoid::Errors::DocumentNotFound => e
66
+ puts! e, 'e'
67
+ render :status => 404, :json => e
68
+ end
69
+ end
70
+
71
+ ## webhook
72
+ def stripe_confirm
73
+ authorize! :open_permission, ::Ishapi
74
+ payload = request.body.read
75
+ event = nil
76
+ begin
77
+ event = Stripe::Event.construct_from(JSON.parse(payload, symbolize_names: true))
78
+ rescue StandardError => e
79
+ puts! e, 'e'
80
+ render status: 400, json: { status: :not_ok }
81
+ return
82
+ end
83
+
84
+ payment_intent = event.data.object
85
+
86
+ payment = Ish::Payment.where( payment_intent_id: payment_intent.id ).first
87
+ if payment && payment_intent['status'] == 'succeeded'
88
+ payment.update_attributes( status: :confirmed )
89
+ payment.profile.update_attributes!( n_unlocks: payment.profile.n_unlocks + 5 )
90
+ end
91
+
92
+ render status: 200, json: { status: :ok }
93
+ end
94
+
95
+ def unlock
96
+ authorize! :unlock, ::Ish::Payment
97
+ item = Object::const_get(params['kind']).find params['id']
98
+
99
+ existing = Purchase.where( user_profile: @current_user.profile, item: item ).first
100
+ if existing
101
+ render status: 200, json: { status: :ok, message: 'already purchased' }
102
+ return
103
+ end
104
+
105
+ @current_user.profile.update_attributes n_unlocks: @current_user.profile.n_unlocks - 1 # @TODO: the number is variable
106
+ purchase = ::Gameui::PremiumPurchase.create!( item: item, user_profile: @current_user.profile, )
107
+
108
+ render status: 200, json: { status: :ok }
109
+ end
110
+
39
111
  end
40
112
  end
41
113
 
@@ -3,6 +3,8 @@ require_dependency "ishapi/application_controller"
3
3
  module Ishapi
4
4
  class SitesController < ApplicationController
5
5
 
6
+ before_action :check_profile_optionally, only: %i| show |
7
+
6
8
  def index
7
9
  authorize! :index, ::Site
8
10
  @sites = ::Site.all
@@ -14,10 +16,9 @@ module Ishapi
14
16
  else
15
17
  domain = params[:domain]
16
18
  end
17
- @site = ::Site.find_by :domain => domain, :lang => :en
19
+ @site = ::Site.find_by(domain: domain, lang: :en)
18
20
  authorize! :show, @site
19
21
 
20
-
21
22
  if @site.is_private
22
23
  if !params[:accessToken]
23
24
  render :json => { :status => :unauthorized}, :status => :unauthorized
@@ -9,12 +9,5 @@ module Ishapi
9
9
  authorize! :show, @profile
10
10
  end
11
11
 
12
- def my
13
- puts! params, 'params 233'
14
-
15
- @profile = current_user.profile
16
- authorize! :show, @profile
17
- end
18
-
19
12
  end
20
13
  end
@@ -3,7 +3,6 @@ class Ishapi::Ability
3
3
  include ::CanCan::Ability
4
4
 
5
5
  def initialize user
6
-
7
6
  #
8
7
  # signed in user
9
8
  #
@@ -13,15 +12,18 @@ class Ishapi::Ability
13
12
  can :manage, :all
14
13
  end
15
14
 
15
+ can [ :update ], ::CoTailors::Address do |address|
16
+ puts [ user.inspect, address.inspect ], '+++ user in cancancan'
17
+ true
18
+ end
19
+
20
+ can [ :my_index ], Gallery
16
21
  can [ :show ], Gallery do |gallery|
17
22
  gallery.user_profile == user.profile
18
23
  end
19
24
  can [ :do_purchase ], ::Gameui
20
25
 
21
- can [ :update ], ::CoTailors::Address do |address|
22
- puts [ user.inspect, address.inspect ], '+++ user in cancancan'
23
- true
24
- end
26
+ can [ :create, :unlock ], ::Ish::Payment
25
27
 
26
28
  can [ :buy_stars ], ::IshModels::UserProfile
27
29
 
@@ -42,6 +44,11 @@ class Ishapi::Ability
42
44
 
43
45
  can [ :index, :show ], Event
44
46
 
47
+ #
48
+ # Ish::P
49
+ #
50
+
51
+
45
52
  #
46
53
  # G
47
54
  #
@@ -11,7 +11,7 @@ json.array! @galleries do |gallery|
11
11
  json.subhead gallery.subhead
12
12
  json.username gallery.user_profile.name
13
13
  json.cityname gallery.city.name if gallery.city
14
- json.tagname gallery.tag.name_seo if gallery.tag
14
+ json.tag_names gallery.tags.map &:name_seo
15
15
  json.venuename gallery.venue.name if gallery.venue
16
16
  json.partial! 'ishapi/photos/index', :photos => gallery.photos
17
17
  end
@@ -8,6 +8,8 @@ json.n_galleries @profile.galleries.count
8
8
  json.n_videos @profile.videos.count
9
9
  json.n_stars @profile.n_stars
10
10
 
11
+ json.n_unlocks @profile.n_unlocks
12
+
11
13
  if @profile.current_city
12
14
  json.current_city @profile.current_city
13
15
  end
@@ -1,7 +1,9 @@
1
1
 
2
2
  json.videos(@videos) do |video|
3
- json.name video.name
4
- json.video_url video.video
5
- json.thumb_url video.thumb
3
+ json.created_at video.created_at
4
+ json.id video.id.to_s
5
+ json.name video.name
6
+ json.thumb_url video.thumb
7
+ json.video_url video.video
6
8
  end
7
9
 
@@ -10,7 +10,7 @@ json.newsitems do
10
10
  json.name item.name
11
11
  json.created_at item.created_at
12
12
  json.updated_at item.updated_at
13
-
13
+
14
14
  if item.gallery
15
15
  json.item_type 'gallery'
16
16
  json.name item.gallery.name
@@ -39,7 +39,7 @@ json.newsitems do
39
39
  json.username item.report.user_profile.name if item.report.user_profile
40
40
 
41
41
  if item.report.photo
42
- json.photo_s169_url item.report.photo.photo.url( :s169 )
42
+ json.photo_s169_url item.report.photo.photo.url( :s169 )
43
43
  json.photo_thumb2_url item.report.photo.photo.url( :thumb2 )
44
44
  end
45
45
 
@@ -51,7 +51,7 @@ json.newsitems do
51
51
  json.is_purchased current_user.profile.has_premium_purchase( item.report )
52
52
  end
53
53
  end
54
-
54
+
55
55
  if item.video_id
56
56
  json.partial! 'ishapi/videos/show', :video => Video.unscoped.find( item.video_id )
57
57
  end
@@ -60,6 +60,6 @@ json.newsitems do
60
60
  json.item_type 'photo'
61
61
  json.partial! 'ishapi/photos/index', :photos => [ item.photo ]
62
62
  end
63
-
63
+
64
64
  end
65
65
  end
@@ -1,4 +1,4 @@
1
-
1
+
2
2
  #
3
3
  # ishapi / sites / show
4
4
  #
@@ -22,7 +22,7 @@ json.cache! key do
22
22
  json.partial! 'ishapi/newsitems/index', :newsitems => @newsitems, :resource => @site
23
23
  json.partial! 'ishapi/reports/index', :reports => @reports, :resource => @site
24
24
  json.partial! 'ishapi/videos/index', :videos => @site.videos
25
-
25
+
26
26
  json.feature_tags do
27
27
  json.array! @feature_tags do |feature_tag|
28
28
  json.partial! 'ishapi/tags/widget', :tag => feature_tag
@@ -1,6 +1,6 @@
1
1
  Ishapi::Engine.routes.draw do
2
- root :to => 'api#home'
3
- post 'home', :to => 'api#home'
2
+ root :to => 'application#home'
3
+ post 'home', :to => 'application#home'
4
4
 
5
5
  resources :addresses
6
6
 
@@ -15,8 +15,6 @@ Ishapi::Engine.routes.draw do
15
15
  namespace :co_tailors do
16
16
  end
17
17
 
18
- post 'do_purchase', to: 'gameui#do_purchase'
19
-
20
18
  get 'events/view/:eventname', :to => 'events#show'
21
19
 
22
20
  get 'galleries', :to => 'galleries#index'
@@ -29,17 +27,21 @@ Ishapi::Engine.routes.draw do
29
27
  get 'maps', to: 'maps#index'
30
28
  get 'maps/view/:slug', to: 'maps#show'
31
29
  get 'markers/view/:slug', to: 'maps#show_marker'
32
-
33
- get 'my/newsitems', to: 'newsitems#index'
34
- get 'my/account', to: 'user_profiles#my'
30
+ get "/my/account", to: "my/my#account"
35
31
  namespace :my do
36
- # post 'reports', :to => 'reports#index'
37
- get 'reports', :to => 'reports#index'
38
- get 'videos', to: 'videos#index'
39
- post 'videos', to: 'videos#index'
32
+ get 'galleries', to: 'galleries#index'
33
+ get 'newsitems', to: 'newsitems#index'
34
+ get 'reports', to: 'reports#index'
35
+ get 'videos', to: 'videos#index'
36
+ post 'videos', to: 'videos#index'
40
37
  end
41
38
 
39
+ post 'do_purchase', to: 'gameui#do_purchase' # @TODO: rename to just purchase, or destroy endpoint
42
40
  post 'payments', :to => 'payments#create'
41
+ post 'payments2', :to => 'payments#create2' # @TODO: change
42
+ get 'payments2', to: 'payments#create2'
43
+ post 'payments/unlock', to: 'payments#unlock' # do_purchase
44
+ post 'stripe_confirm', to: 'payments#stripe_confirm' # @TODO: test-drive
43
45
 
44
46
  get 'profiles/view/:username', :to => 'user_profiles#show'
45
47
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ishapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.131
4
+ version: 0.1.8.136
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-04 00:00:00.000000000 Z
11
+ date: 2020-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -195,7 +195,6 @@ files:
195
195
  - app/assets/stylesheets/ishapi/articles.css
196
196
  - app/assets/stylesheets/scaffold.css
197
197
  - app/controllers/ishapi/addresses_controller.rb
198
- - app/controllers/ishapi/api_controller.rb
199
198
  - app/controllers/ishapi/application_controller.rb
200
199
  - app/controllers/ishapi/articles_controller.rb
201
200
  - app/controllers/ishapi/cities_controller.rb
@@ -205,6 +204,7 @@ files:
205
204
  - app/controllers/ishapi/invoices_controller.rb
206
205
  - app/controllers/ishapi/maps_controller.rb
207
206
  - app/controllers/ishapi/measurements_controller.rb
207
+ - app/controllers/ishapi/my/galleries_controller.rb
208
208
  - app/controllers/ishapi/my/my_controller.rb
209
209
  - app/controllers/ishapi/my/reports_controller.rb
210
210
  - app/controllers/ishapi/my/videos_controller.rb
@@ -249,6 +249,7 @@ files:
249
249
  - app/views/ishapi/maps/index.jbuilder
250
250
  - app/views/ishapi/maps/show.jbuilder
251
251
  - app/views/ishapi/measurements/_show.jbuilder
252
+ - app/views/ishapi/my/my/account.jbuilder
252
253
  - app/views/ishapi/my/videos/index.jbuilder
253
254
  - app/views/ishapi/newsitems/_index.jbuilder
254
255
  - app/views/ishapi/newsitems/index.jbuilder
@@ -265,7 +266,6 @@ files:
265
266
  - app/views/ishapi/tags/_widget.jbuilder
266
267
  - app/views/ishapi/tags/index.jbuilder
267
268
  - app/views/ishapi/tags/show.jbuilder
268
- - app/views/ishapi/user_profiles/my.jbuilder
269
269
  - app/views/ishapi/user_profiles/show.jbuilder
270
270
  - app/views/ishapi/users/_index.jbuilder
271
271
  - app/views/ishapi/users/show.jbuilder
@@ -284,7 +284,7 @@ homepage: http://wasya.co
284
284
  licenses:
285
285
  - MIT
286
286
  metadata: {}
287
- post_install_message:
287
+ post_install_message:
288
288
  rdoc_options: []
289
289
  require_paths:
290
290
  - lib
@@ -300,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
300
300
  version: '0'
301
301
  requirements: []
302
302
  rubygems_version: 3.0.6
303
- signing_key:
303
+ signing_key:
304
304
  specification_version: 4
305
305
  summary: Summary of Ishapi.
306
306
  test_files: []
@@ -1,13 +0,0 @@
1
- require_dependency "ishapi/application_controller"
2
-
3
- module Ishapi
4
- class ApiController < UnrestrictedController
5
-
6
- def home
7
- authorize! :welcome_home, Ishapi
8
- render :json => { :status => :ok, :message => 'Ishapi::ApiController.home',
9
- :n_reports => Report.count, :n_cities => City.count }
10
- end
11
-
12
- end
13
- end