Skip to content

Commit

Permalink
remove null type
Browse files Browse the repository at this point in the history
  • Loading branch information
codemist committed Aug 29, 2024
1 parent 0c7ad96 commit b9f776b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/db/tables/subscribers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function getSubscriberById(id: SubscriberRow["id"]) {
/* c8 ignore start */
async function getSubscriberByFxaUid(
uid: SubscriberRow["fxa_uid"],
): Promise<SubscriberRow | null> {
): Promise<SubscriberRow> {
const [subscriber] = await knex("subscribers").where({
fxa_uid: uid,
});
Expand All @@ -49,7 +49,7 @@ async function getSubscriberByFxaUid(
// * @deprecated Use [[getSubscriberByFxAUid]] instead, as email identifiers are unstable (e.g. we've had issues with case-sensitivity).
async function getSubscriberByEmail(
email: SubscriberRow["primary_email"],
): Promise<SubscriberRow | null> {
): Promise<SubscriberRow> {
const [subscriber] = await knex("subscribers").where({
primary_email: email,
primary_verified: true,
Expand Down
2 changes: 1 addition & 1 deletion src/knex-tables.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ declare module "knex/types/tables" {
monthly_email_optout: boolean;
monthly_monitor_report_at: null | Date;
monthly_monitor_report: boolean;
breach_resolution?: BreachResolution;
breach_resolution: BreachResolution;
onerep_profile_id: null | number;
sign_in_count: null | number;
email_addresses: SubscriberEmail[];
Expand Down

0 comments on commit b9f776b

Please sign in to comment.