Skip to content

Commit e1f5040

Browse files
committed
disable email updates
1 parent 3b7e9df commit e1f5040

File tree

4 files changed

+1
-10
lines changed

4 files changed

+1
-10
lines changed

backend/app/models/users.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class UserIn(UserBase):
1919

2020

2121
class UserUpdate(BaseModel):
22-
email: Optional[EmailStr]
2322
first_name: Optional[str]
2423
last_name: Optional[str]
2524
password: Optional[str]

backend/app/routers/authentication.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async def update_current_user(
106106
try:
107107
await update_user(
108108
current_user.email,
109-
userUpdate.email,
109+
None,
110110
userUpdate.password,
111111
userUpdate.first_name,
112112
userUpdate.last_name,
@@ -127,8 +127,6 @@ async def update_current_user(
127127
# Update local user
128128
user = await UserDB.find_one(UserDB.email == current_user.email)
129129

130-
if userUpdate.email:
131-
user.email = userUpdate.email
132130
if userUpdate.first_name:
133131
user.first_name = userUpdate.first_name
134132
if userUpdate.last_name:

frontend/src/openapi/v2/models/UserUpdate.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
/* eslint-disable */
44

55
export type UserUpdate = {
6-
email?: string;
76
first_name?: string;
87
last_name?: string;
98
password?: string;

openapi.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14792,11 +14792,6 @@
1479214792
"title": "UserUpdate",
1479314793
"type": "object",
1479414794
"properties": {
14795-
"email": {
14796-
"title": "Email",
14797-
"type": "string",
14798-
"format": "email"
14799-
},
1480014795
"first_name": {
1480114796
"title": "First Name",
1480214797
"type": "string"

0 commit comments

Comments
 (0)