ishapi 0.1.8.169 → 0.1.8.171

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: '08c592821bf116f81b983afba7ed5986838709ff2328c22a32219efdc01c8c83'
4
- data.tar.gz: 65b5532741934fa9abeddb5e7f226e7d38bcb2c66255812177574334275598cb
3
+ metadata.gz: 1061557c4a428d72d380f5eaa54ece94dfb5c6c5493707d23297007af653b929
4
+ data.tar.gz: 310cf825c56d201501a57e592ef31a0ae8b282811c1d43d6cb91399f80d4deb2
5
5
  SHA512:
6
- metadata.gz: b0fe164c5c7c3662bd4f7df897e8b5b10b69441b727392543bc41b3d2d9ab2f6da444a538787d8726160bfe3e4014229cf3d1691b8b9136928dde4a0b2d94135
7
- data.tar.gz: c965e844069b23c23eb4837175f6bdc9dbcac69d11e0a5b3f0c6cf3be98cc6158d45aed5342a085cdb2ec70ea7c7f36fc744daa79484025642c992b8b6616e33
6
+ metadata.gz: 238eaa5df713a592f8f88456771188a357b0ae4d1d5c463ad390e339573b3ce04749ac3c16779588b5be4374ff7798ee5a44155d932d1281f954ca6ab70f0f1f
7
+ data.tar.gz: d9208f4b3fb2075bcb418badad07d7466818eed030381b13aba91474dc24db48d87fc8819ecf934b9ae9e7c296a289cec02b57b133753c51589548f076a3938e
@@ -42,7 +42,7 @@ class Ishapi::ApplicationController < ActionController::Base
42
42
  rescue JWT::ExpiredSignature, JWT::DecodeError => e
43
43
  # flash[:notice] = 'You are not logged in, or you have been logged out.'
44
44
  # puts! 'You are not logged in, or you have been logged out.'
45
- @current_user = User.new
45
+ @current_user = User.new({ profile: Ish::UserProfile.new })
46
46
  end
47
47
  end
48
48
 
@@ -1,10 +1,10 @@
1
1
  require_dependency "ishapi/application_controller"
2
2
 
3
3
  module Ishapi
4
- class CitiesController < UnrestrictedController
4
+ class CitiesController < Ishapi::ApplicationController
5
5
  protect_from_forgery :prepend => true, :with => :exception
6
6
  layout :false
7
-
7
+
8
8
  check_authorization
9
9
  skip_before_action :verify_authenticity_token
10
10
  before_action :set_current_ability
@@ -4,6 +4,8 @@ module Ishapi
4
4
 
5
5
  before_action :check_profile, only: %i| create2 unlock |
6
6
 
7
+ # alphabetized : )
8
+
7
9
  ##
8
10
  ## this is for invoices on wasya.co, isn't it?
9
11
  ## 20200712
@@ -25,6 +25,7 @@ module Ishapi
25
25
 
26
26
  def login
27
27
  @current_user = User.where( email: params[:email] ).first
28
+
28
29
  if !@current_user
29
30
  render json: { status: :not_ok }, status: 401
30
31
  return
@@ -35,15 +36,6 @@ module Ishapi
35
36
  # send the jwt to client
36
37
  @jwt_token = encode(user_id: @current_user.id.to_s)
37
38
  @profile = @current_user.profile
38
-
39
- =begin
40
- render json: {
41
- email: @current_user.email,
42
- jwt_token: @jwt_token,
43
- n_unlocks: @current_user.profile.n_unlocks,
44
- }
45
- =end
46
-
47
39
  end
48
40
  end
49
41
 
@@ -1,4 +1,9 @@
1
1
  module Ishapi
2
2
  module ApplicationHelper
3
+
4
+ def image_missing
5
+ 'https://s3.amazonaws.com/ish-wp/wp-content/uploads/2022/02/25232018/100x100_crossout.png'
6
+ end
7
+
3
8
  end
4
9
  end
@@ -24,8 +24,6 @@ class Ishapi::Ability
24
24
 
25
25
  can [ :create, :unlock ], ::Ish::Payment
26
26
 
27
- can [ :index ], IronWarbler::StockWatch # @TODO: scope this to profile!
28
-
29
27
  can [ :buy_stars ], ::Ish::UserProfile
30
28
 
31
29
  end
@@ -15,7 +15,7 @@ json.cache! this_key do
15
15
  json.description @map.description
16
16
  json.w @map.w
17
17
  json.h @map.h
18
- json.img_path @map.image.image.url(:original)
18
+ json.img_path @map.image ? @map.image.image.url(:original) : image_missing
19
19
  json.updated_at @map.updated_at
20
20
  json.rated @map.rated
21
21
 
@@ -32,7 +32,7 @@ json.cache! this_key do
32
32
  json.partial! 'ishapi/markers/index', markers: @markers
33
33
  else
34
34
  ## I removed json parsing from here! _vp_ 2021-10-14
35
- ## I added json parsing here! _vo_ 2021-10-19
35
+ ## I added json parsing here, and is seems right. _vp_ 2021-10-19
36
36
  json.config JSON.parse @map.config
37
37
  json.labels JSON.parse @map.labels
38
38
  json.partial! 'ishapi/markers/index', markers: @markers
@@ -12,9 +12,11 @@ json.markers do
12
12
  json.h marker.h
13
13
  json.centerOffsetX marker.centerOffsetX
14
14
  json.centerOffsetY marker.centerOffsetY
15
- json.img_path marker.image.image.url(:original)
16
- json.title_img_path marker.title_image.image.url(:thumb)
15
+ json.img_path marker.image ? marker.image.image.url(:original) : image_missing
16
+ json.title_img_path marker.title_image ? marker.title_image.image.url(:thumb) : image_missing
17
17
  json.item_type marker.item_type
18
18
  json.url marker.url
19
+ json.premium_tier marker.destination.premium_tier
20
+ json.id marker.destination.id.to_s
19
21
  end
20
22
  end
@@ -2,8 +2,6 @@
2
2
  # ishapi / newsitems / _index
3
3
  #
4
4
 
5
- puts! newsitems, 'newsitems idx'
6
-
7
5
  json.n_newsitems newsitems.count
8
6
  json.newsitems do
9
7
  json.array! newsitems do |item|
@@ -1,7 +1,6 @@
1
1
 
2
-
2
+ json.id @profile.id
3
3
  json.name @profile.name
4
- json.username @profile.username
5
4
  json.email @profile.email
6
5
  json.profile_photo_url @profile.profile_photo.photo.url( :thumb ) if @profile.profile_photo
7
6
 
@@ -1,5 +1,5 @@
1
1
 
2
- json.email @profile.email
2
+ json.email @profile.email
3
3
  json.n_unlocks @profile.n_unlocks
4
4
  json.jwt_token @jwt_token
5
- json.partial! 'account'
5
+ json.partial! 'account'
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.169
4
+ version: 0.1.8.171
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-16 00:00:00.000000000 Z
11
+ date: 2022-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -273,13 +273,12 @@ files:
273
273
  - app/controllers/ishapi/sites_controller.rb
274
274
  - app/controllers/ishapi/stock_watches_controller.rb
275
275
  - app/controllers/ishapi/tags_controller.rb
276
- - app/controllers/ishapi/unrestricted_controller.rb
276
+ - app/controllers/ishapi/unrestricted_controller.rb-trash
277
277
  - app/controllers/ishapi/user_profiles_controller.rb
278
278
  - app/controllers/ishapi/users_controller.rb
279
279
  - app/controllers/ishapi/venues_controller.rb
280
280
  - app/controllers/ishapi/videos_controller.rb
281
281
  - app/helpers/ishapi/application_helper.rb
282
- - app/helpers/ishapi/articles_helper.rb
283
282
  - app/jobs/ishapi/application_job.rb
284
283
  - app/mailers/ishapi/application_mailer.rb
285
284
  - app/models/ishapi/ability.rb
@@ -1,4 +0,0 @@
1
- module Ishapi
2
- module ArticlesHelper
3
- end
4
- end