cahnges
Browse files
app.py
CHANGED
@@ -128,14 +128,20 @@ def ExtractSkills(skill_data: SkillDetails):
|
|
128 |
|
129 |
from datetime import datetime
|
130 |
from typing import Union
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
|
129 |
from datetime import datetime
|
130 |
from typing import Union
|
131 |
+
from typing import Any, Union
|
132 |
+
from pydantic import BaseModel, EmailStr
|
133 |
+
class UserIn(BaseModel):
|
134 |
+
username: str
|
135 |
+
password: str
|
136 |
+
email: EmailStr
|
137 |
+
full_name: Union[str, None] = None
|
138 |
+
|
139 |
+
|
140 |
+
class UserOut(BaseModel):
|
141 |
+
username: str
|
142 |
+
email: EmailStr
|
143 |
+
full_name: Union[str, None] = None
|
144 |
+
|
145 |
+
@app.post("/user/", response_model=UserOut)
|
146 |
+
async def create_user(user: UserIn) -> Any:
|
147 |
+
return user
|