ishapi 0.1.8.280 → 0.1.8.282
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 +4 -4
- data/app/controllers/ishapi/products_controller.rb +16 -0
- data/app/models/ishapi/ability.rb +7 -0
- data/app/views/ishapi/products/show.jbuilder +11 -4
- data/config/routes.rb +13 -5
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc630318a85a11adb850ff24945427f7f129ac4beb4f2ce9408663feab01174b
|
4
|
+
data.tar.gz: 654d3cb276509334ebeb2db252e65fddf0b6b8b820f342dbbbd6e1cfb03db987
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8c95e9e7e6ec52359c92d4c376d8e3198464e7ee40fdbe241040c33b6b7cc104d934d1680122de11806a40571e16b106e7770f6e75b7904d345b0f05cbdc94c
|
7
|
+
data.tar.gz: d74cfe728d233cecf852130536e7ce4f23b79d964a1faf84c69430e70e14a669e643f35cf108218a05829fea1ae91bbeec177708d55a3f89e4f15b4bd3cbdef5
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_dependency "ishapi/application_controller"
|
2
|
+
|
3
|
+
class Ishapi::ProductsController < Ishapi::ApplicationController
|
4
|
+
|
5
|
+
# before_action :soft_check_long_term_token, only: [ :show ]
|
6
|
+
before_action :check_jwt
|
7
|
+
|
8
|
+
def show
|
9
|
+
@product = Wco::Product.find params[:id]
|
10
|
+
|
11
|
+
puts! @product.prices.to_a, 'to_a'
|
12
|
+
|
13
|
+
authorize! :show, @product
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -1,9 +1,16 @@
|
|
1
1
|
|
2
2
|
params.permit!
|
3
3
|
json.cache! [ params, @product ] do
|
4
|
-
|
5
|
-
json.
|
6
|
-
json.
|
7
|
-
|
4
|
+
|
5
|
+
json.id @product.id.to_s
|
6
|
+
json.name @product.name
|
7
|
+
|
8
|
+
json.prices do
|
9
|
+
json.array! @product.prices do |price|
|
10
|
+
json.id price.id.to_s
|
11
|
+
json.name price.name
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
8
15
|
end
|
9
16
|
|
data/config/routes.rb
CHANGED
@@ -45,6 +45,16 @@ Ishapi::Engine.routes.draw do
|
|
45
45
|
# N
|
46
46
|
delete 'newsitems/:id', to: 'newsitems#destroy'
|
47
47
|
|
48
|
+
## O
|
49
|
+
|
50
|
+
# resources :option_price_items
|
51
|
+
get 'option_price_items/view-by/symbol/:symbol', to: 'option_price_items#view_by_symbol', :constraints => { :symbol => /[^\/]+/ } ## the symbol is detailed eg 'GME_011924P30'
|
52
|
+
get 'option_price_items/index1', to: 'option_price_items#index', defaults: { kind: 'kind-1' }
|
53
|
+
get 'option_price_items/view/:symbol/from/:begin_at/to/:end_at', to: 'option_price_items#view'
|
54
|
+
|
55
|
+
|
56
|
+
## P
|
57
|
+
|
48
58
|
post 'do_purchase', to: 'gameui#do_purchase' # @TODO: rename to just purchase, or destroy endpoint
|
49
59
|
post 'payments', :to => 'payments#create'
|
50
60
|
post 'payments/unlock', to: 'payments#unlock' # do_purchase
|
@@ -53,13 +63,11 @@ Ishapi::Engine.routes.draw do
|
|
53
63
|
get 'photos/view/:id', to: 'photos#show'
|
54
64
|
get 'profiles/view/:username', :to => 'user_profiles#show'
|
55
65
|
|
56
|
-
|
66
|
+
get 'products/:id', to: 'products#show'
|
57
67
|
|
68
|
+
## S
|
58
69
|
|
59
|
-
|
60
|
-
get 'option_price_items/view-by/symbol/:symbol', to: 'option_price_items#view_by_symbol', :constraints => { :symbol => /[^\/]+/ } ## the symbol is detailed eg 'GME_011924P30'
|
61
|
-
get 'option_price_items/index1', to: 'option_price_items#index', defaults: { kind: 'kind-1' }
|
62
|
-
get 'option_price_items/view/:symbol/from/:begin_at/to/:end_at', to: 'option_price_items#view'
|
70
|
+
post 'stars/buy', to: 'gameui#buy_stars'
|
63
71
|
|
64
72
|
|
65
73
|
get 'test', to: 'application#test'
|
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.
|
4
|
+
version: 0.1.8.282
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -228,6 +228,7 @@ files:
|
|
228
228
|
- app/controllers/ishapi/orders_controller.rb
|
229
229
|
- app/controllers/ishapi/payments_controller.rb
|
230
230
|
- app/controllers/ishapi/photos_controller.rb
|
231
|
+
- app/controllers/ishapi/products_controller.rb
|
231
232
|
- app/controllers/ishapi/stock_watches_controller.rb
|
232
233
|
- app/controllers/ishapi/user_profiles_controller.rb
|
233
234
|
- app/controllers/ishapi/users/registrations_controller.rb
|