Gregniuki commited on
Commit
50e8588
·
1 Parent(s): c891527

Update auth.py

Browse files
Files changed (1) hide show
  1. auth.py +4 -0
auth.py CHANGED
@@ -19,6 +19,10 @@ class AuthViews:
19
  self.SECRET_KEY = "your-secret-key" # Replace with your actual secret key
20
  self.ALGORITHM = "HS256"
21
  self.ACCESS_TOKEN_EXPIRE_MINUTES = 30
 
 
 
 
22
 
23
  def register(self, user: UserCreate, db: Session = Depends(get_db)):
24
  # Validate email format and check for existing users
 
19
  self.SECRET_KEY = "your-secret-key" # Replace with your actual secret key
20
  self.ALGORITHM = "HS256"
21
  self.ACCESS_TOKEN_EXPIRE_MINUTES = 30
22
+ # User model
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