forked from mozilla/blurts-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix mozilla#242: use app.locals.breaches
Update hibp module to match breached account website to app.locals.breaches Update /scan route to use app.locals.breaches Update views to use new breach objects from app.locals.breaches Drop Breach model and related scripts and db/utils code
- Loading branch information
1 parent
e9dcd0f
commit 111601b
Showing
12 changed files
with
19 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,12 @@ | ||
"use strict"; | ||
|
||
const Model = require("objection").Model; | ||
const path = require("path"); | ||
|
||
class EmailHash extends Model { | ||
// Table name is the only required property. | ||
static get tableName() { | ||
return "email_hashes"; | ||
} | ||
|
||
static get relationMappings() { | ||
return { | ||
breaches: { | ||
relation: Model.ManyToManyRelation, | ||
modelClass: path.join(__dirname, "breach"), | ||
join: { | ||
from: "email_hashes.id", | ||
through: { | ||
from: "breached_hashes.sha1_id", | ||
to: "breached_hashes.breach_id", | ||
extra: ["notified"], | ||
}, | ||
to: "breaches.id", | ||
}, | ||
}, | ||
}; | ||
} | ||
} | ||
|
||
module.exports = EmailHash; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{{!< email }} | ||
Uh-oh, {{ email }} was involved in {{ breach.meta.Title }} data breach. | ||
Uh-oh, {{ email }} was involved in {{ breach.Title }} data breach. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.