Update auth.py
Browse files
auth.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# app/
|
2 |
from fastapi import APIRouter, Depends, HTTPException, Form, Response, status, FastAPI
|
3 |
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
|
4 |
from fastapi.templating import Jinja2Templates
|
@@ -23,6 +23,7 @@ class AuthViews:
|
|
23 |
class UserCreate(BaseModel):
|
24 |
username: str
|
25 |
password: str
|
|
|
26 |
|
27 |
def register(self, user: UserCreate, db: Session = Depends(get_db)):
|
28 |
# Validate email format and check for existing users
|
|
|
1 |
+
# app/auth.py
|
2 |
from fastapi import APIRouter, Depends, HTTPException, Form, Response, status, FastAPI
|
3 |
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
|
4 |
from fastapi.templating import Jinja2Templates
|
|
|
23 |
class UserCreate(BaseModel):
|
24 |
username: str
|
25 |
password: str
|
26 |
+
email: str
|
27 |
|
28 |
def register(self, user: UserCreate, db: Session = Depends(get_db)):
|
29 |
# Validate email format and check for existing users
|