ishapi 0.1.8.254 → 0.1.8.256

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: 13f63645faf4ca0262003033c9f3a8b22ecdd17f4c4df7ac82dedf268ecc3be1
4
- data.tar.gz: a5f84e4158ce19d00398050149f57df6e9721195a95547e46af2c2ea4950e65b
3
+ metadata.gz: f7be7e944fe040f6d8c8b41e7b8c8ee95e9cd1452ee29f07684fc92b4dc29f31
4
+ data.tar.gz: 9d04f5e48774f18bb31cc32d266613c10ca826ed9c4003d71d788d8cf0ab684a
5
5
  SHA512:
6
- metadata.gz: e4b617956d9db8d0c22393299f15e4734f9c1a743b936973b351578b76bdbe1e4ab88c9bae6db77879d1319d580eaaaa0d7c4d5eb631fa6e76adddb0fa8128e3
7
- data.tar.gz: f955f43ff3987f4ac16c79f7c4796d200c468ca49f55d625b655fd920e0510faf3f77bc884fef6fbda301d46474107d9c19f3433f1abc86b1a7a6efeffc4d832
6
+ metadata.gz: d2a0be8652485efcc2625054083ee810acd62f37a01aeaa3375702becf22059cc4ab4181851cdf621cb8189d3b7d26d6f8b12553b4a7e933097510bdcf4f7cb7
7
+ data.tar.gz: e02625e042f046018d03e13b78073fcc4cc9a9d7ab50591b602c733daff563851213c137dc72a3b5d4c5a0140e1a29602ae8c15becaa1ed8a470f601a3bad3bf
@@ -10,6 +10,7 @@ class ::Ishapi::ApplicationController < ActionController::Base
10
10
  end
11
11
 
12
12
  ## POST /api/users/long_term_token , a FB login flow
13
+ ## 2023-03-29 _vp_ This should not work, needs to be rewritten.
13
14
  def long_term_token
14
15
  accessToken = request.headers[:accessToken]
15
16
  accessToken ||= params[:accessToken]
@@ -27,7 +28,7 @@ class ::Ishapi::ApplicationController < ActionController::Base
27
28
  @current_profile = Ish::UserProfile.find_by( email: @current_user.email )
28
29
 
29
30
  # send the jwt to client
30
- @jwt_token = encode(user_id: @current_user.id.to_s)
31
+ @jwt_token = encode(user_profile_id: @current_user.profile.id.to_s)
31
32
 
32
33
  render json: {
33
34
  email: @current_user.email,
@@ -25,7 +25,7 @@ module Ishapi
25
25
  respond_to do |format|
26
26
  format.json do
27
27
 
28
- if @gallery.premium?
28
+ if @gallery.is_premium
29
29
  if @current_user&.profile&.has_premium_purchase( @gallery )
30
30
  render 'show_premium_unlocked'
31
31
  else
@@ -38,7 +38,7 @@ module Ishapi
38
38
  end
39
39
  format.html do
40
40
 
41
- if @gallery.premium?
41
+ if @gallery.is_premium
42
42
  if @current_user&.profile&.has_premium_purchase( @gallery )
43
43
  render 'show_premium_unlocked'
44
44
  else
@@ -18,8 +18,7 @@ class Ishapi::MapsController < Ishapi::ApplicationController
18
18
 
19
19
  authorize! :show, @map
20
20
 
21
- @newsitems = @location.newsitems.page( params[:newsitems_page]
22
- ).per( @location.newsitems_page_size )
21
+ @newsitems = @location.newsitems.page( params[:newsitems_page] ).per( @location.newsitems_page_size )
23
22
 
24
23
  @markers = @map.markers.permitted_to(@current_profile).order_by(ordering: :asc)
25
24
  # case @map.ordering_type
@@ -3,6 +3,9 @@ class Ishapi::PaymentsController < ::Ishapi::ApplicationController
3
3
 
4
4
  before_action :check_profile, only: %i| create unlock |
5
5
 
6
+ ## Hmmm, ishapi does not verify authenticity token.
7
+ # skip_before_action :verify_authenticity_token, only: %i| create stripe_confirm |
8
+
6
9
  # alphabetized : )
7
10
 
8
11
  ## _vp_ 2020-07-21 This is for guyd
@@ -15,8 +18,6 @@ class Ishapi::PaymentsController < ::Ishapi::ApplicationController
15
18
  def create
16
19
  authorize! :create, ::Ish::Payment
17
20
 
18
- puts! @current_profile, 'current_profile'
19
-
20
21
  @current_profile.update_attributes({ is_purchasing: true })
21
22
 
22
23
  begin
@@ -82,7 +83,7 @@ class Ishapi::PaymentsController < ::Ishapi::ApplicationController
82
83
  authorize! :unlock, ::Ish::Payment
83
84
  item = Object::const_get(params['kind']).find params['id']
84
85
 
85
- existing = Purchase.where( user_profile: @current_profile, item: item ).first
86
+ existing = Ish::Payment.where( profile: @current_profile, item: item ).first
86
87
  if existing
87
88
  render status: 200, json: { status: :ok, message: 'already purchased' }
88
89
  return
@@ -90,7 +91,7 @@ class Ishapi::PaymentsController < ::Ishapi::ApplicationController
90
91
 
91
92
  @current_profile.inc( n_unlocks: -item.premium_tier )
92
93
 
93
- purchase = ::Gameui::PremiumPurchase.create!( item: item, user_profile: @current_profile, )
94
+ purchase = ::Ish::Payment.create!( item: item, profile: @current_profile, )
94
95
 
95
96
  @profile = @current_profile
96
97
  render 'ishapi/user_profiles/account'
@@ -14,6 +14,7 @@ json.cache! this_key do
14
14
  json.h map.h
15
15
  # json.x map.x
16
16
  # json.y map.y
17
+ # json.z map.z
17
18
  # json.map_type map.map_type
18
19
  json.img_path map.image.image.url(:original)
19
20
  json.updated_at map.updated_at
@@ -7,15 +7,12 @@ json.profile_photo_url profile.profile_photo.photo.url( :thumb ) if profile.prof
7
7
  json.n_reports profile.reports.count
8
8
  json.n_galleries profile.galleries.count
9
9
  json.n_videos profile.videos.count
10
- # json.n_stars profile.n_stars # @TODO: which one is deprecated?
10
+
11
11
  json.n_unlocks profile.n_unlocks # @TODO: which one is deprecated?
12
12
  json.is_purchasing profile.is_purchasing
13
- if profile.current_city
14
- json.current_city profile.current_city
15
- end
16
13
 
17
- json.bookmarks profile.bookmarks do |b|
18
- json.name b.name
19
- json.slug b.slug
20
- end
14
+ # json.bookmarks profile.bookmarks do |b|
15
+ # json.name b.name
16
+ # json.slug b.slug
17
+ # end
21
18
 
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.254
4
+ version: 0.1.8.256
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-29 00:00:00.000000000 Z
11
+ date: 2023-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails