Skip to content

Commit

Permalink
Merge branch 'main' into workaround/jest-coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinnl authored Feb 17, 2025
2 parents 3ae8b13 + 9891e39 commit a1e891c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 8 deletions.
1 change: 1 addition & 0 deletions locales/nn-NO/settings.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@ settings-alert-preferences-allow-monthly-monitor-report-subtitle = Ei månadleg

settings-tab-label-edit-info = Rediger opplysningane dine
settings-tab-label-notifications = Still inn varsel
settings-tab-label-manage-account = Handsam kontoen
settings-tab-subtitle-manage-account = Handsam { -product-name }-kontoen din.
settings-tab-notifications-marketing-link-label = Gå til e-postinnstillingar for { -brand-mozilla }
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
export function up(knex) {
return knex.schema.table("qa_custom_brokers", (table) => {
table.integer("id").nullable();
table.dropColumn("onerep_profile_id");
table.string("data_broker_id").nullable();
});
}

/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
export function down(knex) {
return knex.schema.table("qa_custom_brokers", (table) => {
table.dropColumn("id");
table.string("onerep_profile_id").nullable();
table.dropColumn("data_broker_id");
});
}
17 changes: 9 additions & 8 deletions src/db/tables/onerep_scans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ async function getLatestOnerepScanResults(
results = qaBrokers;
} else {
// Fetch initial results from onerep_scan_results
const scanResults = (await knex("onerep_scan_results")
.select("*")
const scanResults = (await knex("onerep_scan_results as sr")
.select(
"sr.*",
"s.created_at as scan_created_at",
"s.updated_at as scan_updated_at",
)
.distinctOn("link")
.where("onerep_profile_id", onerepProfileId)
.innerJoin(
"onerep_scans",
"onerep_scan_results.onerep_scan_id",
"onerep_scans.onerep_scan_id",
)
.innerJoin("onerep_scans as s", "sr.onerep_scan_id", "s.onerep_scan_id")
.orderBy("link")
.orderBy("onerep_scan_result_id", "desc")) as OnerepScanResultRow[];
results = [...scanResults, ...qaBrokers];
Expand Down Expand Up @@ -473,7 +473,8 @@ async function getScanResultsWithBroker(
scanResults = await knex("onerep_scan_results as sr")
.select(
"sr.*",
"s.*",
"s.created_at as scan_created_at",
"s.updated_at as scan_updated_at",
"sr.status as scan_result_status", // rename to avoid collision
"db.status as broker_status", // rename to avoid collision
)
Expand Down

0 comments on commit a1e891c

Please sign in to comment.