Skip to content

Commit

Permalink
fix: wrong LD client ID for staging environment (#1122)
Browse files Browse the repository at this point in the history
* fix: wrong LD client ID for staging environment

* fix: strings.rb usage
AndrasEszes authored Aug 16, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
xatier xatier
1 parent 0778a02 commit 6565ae0
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion rails/strings.rb
Original file line number Diff line number Diff line change
@@ -13,7 +13,8 @@ def strings
apiKey: "pub3ee8559ad1bc8c3c8cd788bd71fe5995"
},
ld: {
client_id: ENV['NODE_ENV'] == "development" ? "5e70774c8a726707851d2ffe" : "5e70774c8a726707851d2fff",
client_id_production: "5e70774c8a726707851d2fff",
client_id_staging: "5e70774c8a726707851d2ffe"
}
},
strings: {
8 changes: 5 additions & 3 deletions source/javascripts/services/_launchDarklyService.js.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
(function() {
(function () {
"use strict";

const CLIENT_SIDE_ID = '<%= data[:constants][:ld][:client_id] %>';
const CLIENT_SIDE_ID = window.parent.location.host === 'app.bitrise.io'
? '<%= data[:constants][:ld][:client_id_production] %>'
: '<%= data[:constants][:ld][:client_id_staging] %>';

angular
.module("BitriseWorkflowEditor")
.service('launchDarklyService', function(requestService, appServiceUtil) {
.service('launchDarklyService', function (requestService, appServiceUtil) {
const launchDarklyService = {};
let client

0 comments on commit 6565ae0

Please sign in to comment.