Skip to content

Commit 5def01e

Browse files
fix!: missing encryption in encryptUser util
1 parent cfd424b commit 5def01e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "backend",
3-
"version": "0.12.0",
3+
"version": "0.12.1",
44
"description": "PoliNetwork backend server",
55
"private": true,
66
"keywords": [],

backend/src/utils/users.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export async function decryptUser(dbUser: typeof SCHEMA.TG.users.$inferSelect):
3232

3333
export async function encryptUser(tgUser: z.infer<typeof TgUserSchema>): Promise<typeof SCHEMA.TG.users.$inferInsert> {
3434
const [firstName, lastName, username] = await Promise.all([
35-
tgUser.firstName,
35+
userCipher.encrypt(tgUser.firstName),
3636
tgUser.lastName ? userCipher.encrypt(tgUser.lastName) : undefined,
3737
tgUser.username ? userCipher.encrypt(tgUser.username) : undefined,
3838
])

package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@polinetwork/backend",
3-
"version": "0.12.0",
3+
"version": "0.12.1",
44
"description": "Utils to interact with the backend.",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)