ishapi 0.1.8.195 → 0.1.8.196

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db2768cbb516aab064a7038386c990a31af404056ccdeb0cdbc22aa59a4e65d7
4
- data.tar.gz: 72a798d3882e44af5b9567882c4b94dc58034c45e6a5c83a7279b55793a74bed
3
+ metadata.gz: 4cac74ad18c61255a3db45b0192d67c09f2ca7b498f7979d47983709f7a0036d
4
+ data.tar.gz: a04ddbdf71da020e89a4baf912f5796600ae37a215828cf01fc4538d5b689ff2
5
5
  SHA512:
6
- metadata.gz: 72afce72b3ceb745fd358889589939e5088da0d7cd2b999d50234980be82f6721b6415bb925f34cba8e431ac92e0c94b5b01666f6363eeff1c4d39c0eb44d550
7
- data.tar.gz: 8df8d085834e683ff0efac5fdb34e36cda116e5312a88894ece276ff1b8d474d6b1fa7ddd1256a3ca93f962413e1b1a1dd862f80643eb53bbfcb084b62efedcc
6
+ metadata.gz: b8deb4efaf0d7c0fcfebda5a5484048f2bbf75350bf8865f8139eac9ebb42373a9f19f1dd79e5bea1220cdf04c4a4dcc494cb920a533f32da59864548518e1e3
7
+ data.tar.gz: b6bf703266e85ac946b3af85c3467cf61f6b33e6ea00025b55f6825d1fc9372a29bf8b5ed19a225dc6137e965c8d9e6a8e27427519d259ba333c9ea30e19fc3a
@@ -51,7 +51,7 @@ module Ishapi
51
51
  ##
52
52
  def create2
53
53
  authorize! :create, ::Ish::Payment
54
- current_user.profile.update_attributes({ is_purchasing: true })
54
+ @current_profile.update_attributes({ is_purchasing: true })
55
55
 
56
56
  begin
57
57
  amount_cents = params[:amount_cents].to_i # @TODO: change
@@ -65,9 +65,9 @@ module Ishapi
65
65
 
66
66
  payment = Ish::Payment.create!(
67
67
  client_secret: intent.client_secret,
68
- email: current_user.email,
68
+ email: @current_profile.email,
69
69
  payment_intent_id: intent.id,
70
- profile_id: current_user.profile.id,
70
+ profile_id: @current_profile.id,
71
71
  )
72
72
 
73
73
  render json: { client_secret: intent.client_secret }
@@ -110,18 +110,18 @@ module Ishapi
110
110
  authorize! :unlock, ::Ish::Payment
111
111
  item = Object::const_get(params['kind']).find params['id']
112
112
 
113
- existing = Purchase.where( user_profile: @current_user.profile, item: item ).first
113
+ existing = Purchase.where( user_profile: @current_profile, item: item ).first
114
114
  if existing
115
115
  render status: 200, json: { status: :ok, message: 'already purchased' }
116
116
  return
117
117
  end
118
118
 
119
- @current_user.profile.inc( n_unlocks: -item.premium_tier )
119
+ @current_profile.inc( n_unlocks: -item.premium_tier )
120
120
 
121
- purchase = ::Gameui::PremiumPurchase.create!( item: item, user_profile: @current_user.profile, )
121
+ purchase = ::Gameui::PremiumPurchase.create!( item: item, user_profile: @current_profile, )
122
122
 
123
- @profile = @current_user.profile
124
- render 'ishapi/users/account'
123
+ @profile = @current_profile
124
+ render 'ishapi/user_profiles/account'
125
125
  end
126
126
 
127
127
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ishapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.195
4
+ version: 0.1.8.196
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox