diff --git a/src/services.js b/src/services.js index cec2af6cb..8d384aded 100644 --- a/src/services.js +++ b/src/services.js @@ -886,7 +886,7 @@ async function setupTurn(app, options) { assert.strictEqual(typeof app, 'object'); assert.strictEqual(typeof options, 'object'); - const turnSecret = await blobs.get(blobs.ADDON_TURN_SECRET); + const turnSecret = await blobs.getString(blobs.ADDON_TURN_SECRET); if (!turnSecret) throw new BoxError(BoxError.ADDONS_ERROR, 'Turn secret is missing'); const env = [ @@ -913,11 +913,11 @@ async function startTurn(existingInfra) { const memory = system.getMemoryAllocation(memoryLimit); const realm = settings.dashboardFqdn(); - let turnSecret = await blobs.get(blobs.ADDON_TURN_SECRET); + let turnSecret = await blobs.getString(blobs.ADDON_TURN_SECRET); if (!turnSecret) { debug('startTurn: generting turn secret'); turnSecret = 'a' + crypto.randomBytes(15).toString('hex'); // prefix with a to ensure string starts with a letter - await blobs.set(blobs.ADDON_TURN_SECRET, Buffer.from(turnSecret)); + await blobs.setString(blobs.ADDON_TURN_SECRET, turnSecret); } const readOnly = !serviceConfig.recoveryMode ? '--read-only' : '';