Projekt

Obecné

Profil

« Předchozí | Další » 

Revize cbd239c6

Přidáno uživatelem Matěj Zeman před asi 2 roky(ů)

Added signup and users table in database. Passwords are hashed. Added view for changing users roles.

Zobrazit rozdíly:

server/sql_app/schemas.py
232 232

  
233 233
    class Config:
234 234
        orm_mode = True
235

  
236

  
237
class UserBase(BaseModel):
238
    """
239
    Classes used for creating new User entry
240
    """
241
    username: str
242
    password: str
243
    role: str
244

  
245
class UserCreate(UserBase):
246
    pass
247

  
248

  
249
class User(UserCreate):
250
    id: int
251

  
252
    class Config:
253
        orm_mode = True

Také k dispozici: Unified diff