forked from open-webui/open-webui
feat: api endpoint to receive profile_image_uirl on signup
This commit is contained in:
parent
6bb299ae25
commit
8d1db9a1c0
3 changed files with 7 additions and 6 deletions
|
@ -30,7 +30,7 @@ class UserModel(BaseModel):
|
|||
name: str
|
||||
email: str
|
||||
role: str = "pending"
|
||||
profile_image_url: str = "/user.png"
|
||||
profile_image_url: str
|
||||
timestamp: int # timestamp in epoch
|
||||
|
||||
|
||||
|
@ -57,7 +57,7 @@ class UsersTable:
|
|||
self.db.create_tables([User])
|
||||
|
||||
def insert_new_user(
|
||||
self, id: str, name: str, email: str, role: str = "pending"
|
||||
self, id: str, name: str, email: str, profile_image_url: str, role: str = "pending",
|
||||
) -> Optional[UserModel]:
|
||||
user = UserModel(
|
||||
**{
|
||||
|
@ -65,7 +65,7 @@ class UsersTable:
|
|||
"name": name,
|
||||
"email": email,
|
||||
"role": role,
|
||||
"profile_image_url": "/user.png",
|
||||
"profile_image_url": profile_image_url,
|
||||
"timestamp": int(time.time()),
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue