Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -183,7 +183,7 @@ async def sms_posts(instance: Result, idx: str = None, action: str = "add") -> U
|
|
183 |
try:
|
184 |
if checker:
|
185 |
if action == "delete":
|
186 |
-
session.delete(instance)
|
187 |
else: # add or update use add
|
188 |
session.add(instance)
|
189 |
await session.commit()
|
@@ -261,7 +261,7 @@ async def update_instructor(instructor: Instructor) -> Union[ErrorResponse, Endp
|
|
261 |
|
262 |
|
263 |
@app.delete('/api/v1/sms/delete_instructor', tags=['Instructor'])
|
264 |
-
async def
|
265 |
return await sms_posts(instructor, instructor.id, action="delete")
|
266 |
|
267 |
|
|
|
183 |
try:
|
184 |
if checker:
|
185 |
if action == "delete":
|
186 |
+
await session.delete(instance)
|
187 |
else: # add or update use add
|
188 |
session.add(instance)
|
189 |
await session.commit()
|
|
|
261 |
|
262 |
|
263 |
@app.delete('/api/v1/sms/delete_instructor', tags=['Instructor'])
|
264 |
+
async def delete_instructor(instructor: Instructor) -> Union[ErrorResponse, EndpointResponse]:
|
265 |
return await sms_posts(instructor, instructor.id, action="delete")
|
266 |
|
267 |
|