mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-01 21:47:16 +00:00
Merge pull request #12341 from mkllnk/connected-app-url
Make URL to connect app translatable
This commit is contained in:
@@ -4,7 +4,7 @@ class ConnectAppJob < ApplicationJob
|
||||
include CableReady::Broadcaster
|
||||
|
||||
def perform(app, token, channel: nil)
|
||||
url = "https://n8n.openfoodnetwork.org.uk/webhook/regen/connect-enterprise"
|
||||
url = I18n.t("connect_app.url")
|
||||
event = "connect-app"
|
||||
enterprise = app.enterprise
|
||||
payload = {
|
||||
|
||||
@@ -265,6 +265,8 @@ en:
|
||||
community_forum_url: "Community forum URL"
|
||||
customer_instructions: "Customer instructions"
|
||||
additional_information: "Additional Information"
|
||||
connect_app:
|
||||
url: "https://n8n.openfoodnetwork.org/webhook/regen/connect-enterprise"
|
||||
devise:
|
||||
passwords:
|
||||
spree_user:
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: https://n8n.openfoodnetwork.org.uk/webhook/regen/connect-enterprise
|
||||
uri: https://n8n.openfoodnetwork.org/webhook/regen/connect-enterprise
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: '{"id":"27bc9d0a-d95c-4a36-9b16-01fdd8a82b51","at":"2023-12-21 14:54:28
|
||||
+1100","event":"connect-app","data":{"@id":"http://test.host/api/dfc/enterprises/3","access_token":"12345"}}'
|
||||
string: '{"id":"c9f0e82a-f200-4c1a-9aa2-3a3a63c7acba","at":"2024-04-05 15:30:57
|
||||
+1100","event":"connect-app","data":{"@id":"http://test.host/api/dfc/enterprises/3","access_token":"<HIDDEN-OPENID_APP_SECRET>"}}'
|
||||
headers:
|
||||
User-Agent:
|
||||
- openfoodnetwork_webhook/1.0
|
||||
@@ -21,34 +21,24 @@ http_interactions:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx
|
||||
Date:
|
||||
- Thu, 21 Dec 2023 03:54:33 GMT
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Content-Length:
|
||||
- '141'
|
||||
Connection:
|
||||
- keep-alive
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Date:
|
||||
- Fri, 05 Apr 2024 04:30:58 GMT
|
||||
Etag:
|
||||
- W/"8d-Lz10bce6zwT2C429xIkj52OBWyk"
|
||||
Strict-Transport-Security:
|
||||
- max-age=315360000; includeSubDomains; preload
|
||||
Vary:
|
||||
- Accept-Encoding
|
||||
Strict-Transport-Security:
|
||||
- max-age=63072000
|
||||
X-Xss-Protection:
|
||||
- 1; mode=block
|
||||
X-Download-Options:
|
||||
- noopen
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Permitted-Cross-Domain-Policies:
|
||||
- none
|
||||
Referrer-Policy:
|
||||
- same-origin
|
||||
X-Xss-Protection:
|
||||
- 1; mode=block
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: '{"link":"https://example.net/update","destroy":"https://n8n.openfoodnetwork.org.uk/webhook/remove-enterprise?id=recjBXXXXXXXXXXXX&key=12345"}'
|
||||
recorded_at: Thu, 21 Dec 2023 03:54:33 GMT
|
||||
string: '{"link":"https://example.net/update","destroy":"https://n8n.openfoodnetwork.org.uk/webhook/remove-enterprise?id=recjBXXXXXXXXXXXX&key=<HIDDEN-OPENID_APP_SECRET>"}'
|
||||
recorded_at: Fri, 05 Apr 2024 04:30:58 GMT
|
||||
recorded_with: VCR 6.2.0
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: https://n8n.openfoodnetwork.org.uk/webhook/regen/connect-enterprise
|
||||
uri: https://n8n.openfoodnetwork.org/webhook/regen/connect-enterprise
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: '{"id":"4da377c8-0c8f-4aaa-8f85-f2a218a13d6e","at":"2023-12-14 12:52:53
|
||||
|
||||
@@ -8,7 +8,7 @@ RSpec.describe ConnectAppJob, type: :job do
|
||||
let(:app) { ConnectedApp.new(enterprise: ) }
|
||||
let(:enterprise) { build(:enterprise, id: 3, owner: user) }
|
||||
let(:user) { build(:user, spree_api_key: "12345") }
|
||||
let(:url) { "https://n8n.openfoodnetwork.org.uk/webhook/regen/connect-enterprise" }
|
||||
let(:url) { "https://n8n.openfoodnetwork.org/webhook/regen/connect-enterprise" }
|
||||
|
||||
it "sends a semantic id and access token" do
|
||||
stub_request(:post, url).to_return(body: '{}')
|
||||
|
||||
Reference in New Issue
Block a user