Skip to content

Commit

Permalink
feat: email will be stored hashed now for all users
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Nov 12, 2024
1 parent 90088fe commit 9a03806
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/db/user-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ class UserStore implements IUserStore {
}

async insert(user: ICreateUser): Promise<User> {
const emailHash = this.db.raw('md5(?)', [user.email]);
const emailHash = user.email
? this.db.raw('md5(?)', [user.email])
: null;
const rows = await this.db(TABLE)
.insert({
...mapUserToColumns(user),
Expand Down

0 comments on commit 9a03806

Please sign in to comment.