solidus_bolt 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/spree/admin/bolt_callback_urls_controller.rb +4 -4
- data/app/views/spree/admin/bolt_callback_urls/{new.html.erb → edit.html.erb} +0 -0
- data/app/views/spree/admin/bolts/show.html.erb +1 -1
- data/config/routes.rb +1 -1
- data/lib/solidus_bolt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d91d355d44749ba39444cd212cf3358af9d4fdc765c0aef0331fc0ea363066e
|
4
|
+
data.tar.gz: d0a97484c2dd27d7ab078480b3a57f979bb438ca714322bc3dd6ba8388dec066
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6499d04e3f47a046fbca944f1d7ad0f8a6181c299175fa5b1734960d912295f47b68596c2eb103651edf40147948a3cba211df1e69c9746d6367165b0bb176b1
|
7
|
+
data.tar.gz: c2d55795d7683a04debbe3d3d18f3a5f46a581759d12d990941af05204fd4281245e238667526ef4ce21d5cf1b54cccbe9c814359729818b285072e3c6467a98
|
@@ -3,11 +3,11 @@
|
|
3
3
|
module Spree
|
4
4
|
module Admin
|
5
5
|
class BoltCallbackUrlsController < Spree::Admin::BaseController
|
6
|
-
def
|
6
|
+
def edit
|
7
7
|
callback_urls = SolidusBolt::MerchantConfiguration::GetCallbackUrlsService.call
|
8
8
|
|
9
|
-
@oauth_logout = callback_urls['callback_urls'].find { |c| c['type'] == 'oauth_logout' }
|
10
|
-
@oauth_redirect = callback_urls['callback_urls'].find { |c| c['type'] == 'oauth_redirect' }
|
9
|
+
@oauth_logout = callback_urls['callback_urls'].find { |c| c['type'] == 'oauth_logout' }&.dig('url')
|
10
|
+
@oauth_redirect = callback_urls['callback_urls'].find { |c| c['type'] == 'oauth_redirect' }&.dig('url')
|
11
11
|
end
|
12
12
|
|
13
13
|
def update
|
@@ -17,7 +17,7 @@ module Spree
|
|
17
17
|
)
|
18
18
|
flash[:success] = "Successfully updated callback urls."
|
19
19
|
|
20
|
-
redirect_to
|
20
|
+
redirect_to edit_admin_bolt_callback_urls_path
|
21
21
|
rescue SolidusBolt::ServerError => e
|
22
22
|
flash[:error] = e.message
|
23
23
|
|
File without changes
|
@@ -12,7 +12,7 @@
|
|
12
12
|
</li>
|
13
13
|
<% else %>
|
14
14
|
<li>
|
15
|
-
<%= link_to 'Configure Callbacks URLs',
|
15
|
+
<%= link_to 'Configure Callbacks URLs', edit_admin_bolt_callback_urls_path, class: 'btn btn-primary' %>
|
16
16
|
</li>
|
17
17
|
<li>
|
18
18
|
<%= link_to 'Configure Webhooks', new_admin_bolt_webhook_path, class: 'btn btn-primary' %>
|
data/config/routes.rb
CHANGED
@@ -4,7 +4,7 @@ Spree::Core::Engine.routes.draw do
|
|
4
4
|
namespace :admin do
|
5
5
|
resource :bolt, only: [:show, :edit, :update]
|
6
6
|
resource :bolt_webhook, only: [:new, :create]
|
7
|
-
resource :bolt_callback_urls, only: [:
|
7
|
+
resource :bolt_callback_urls, only: [:edit, :update]
|
8
8
|
end
|
9
9
|
|
10
10
|
post '/webhooks/bolt', to: '/solidus_bolt/webhooks#update'
|
data/lib/solidus_bolt/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_bolt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piyushswain
|
@@ -283,7 +283,7 @@ files:
|
|
283
283
|
- app/services/solidus_bolt/users/sync_addresses_service.rb
|
284
284
|
- app/services/solidus_bolt/users/sync_payment_sources_service.rb
|
285
285
|
- app/services/solidus_bolt/webhooks/create_service.rb
|
286
|
-
- app/views/spree/admin/bolt_callback_urls/
|
286
|
+
- app/views/spree/admin/bolt_callback_urls/edit.html.erb
|
287
287
|
- app/views/spree/admin/bolt_webhooks/new.html.erb
|
288
288
|
- app/views/spree/admin/bolts/_configuration.html.erb
|
289
289
|
- app/views/spree/admin/bolts/_form.html.erb
|