Skip to content

Commit

Permalink
Use default configuration also for API calls (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Jun 2, 2024
1 parent 92b202a commit 09f3249
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions server/src/util/add-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export async function addTest(request) {
}

export async function addTestFromAPI(
config,
userConfig,
location,
url,
scripting,
Expand All @@ -164,8 +164,12 @@ export async function addTestFromAPI(
priority
) {
const deviceId =
get(config, 'browsertime.firefox.android.deviceSerial') ||
get(config, 'browsertime.chrome.android.deviceSerial');
get(userConfig, 'browsertime.firefox.android.deviceSerial') ||
get(userConfig, 'browsertime.chrome.android.deviceSerial');

const defaultConfig = await getDefaultSitespeedConfiguration();
let config = {};
merge(config, defaultConfig, userConfig);

const slug = get(config, 'slug', '');
let queue = getQueueName(location, deviceId);
Expand Down

0 comments on commit 09f3249

Please sign in to comment.