Spaces:
Running
Running
Upload main.py
Browse files
main.py
CHANGED
@@ -338,28 +338,26 @@ def sibyl_system_ban(
|
|
338 |
except Exception as e:
|
339 |
return ErrorStatus(status="false", message=f"Internal server error: {str(e)}")
|
340 |
|
341 |
-
@app.get("/ryuzaki/sibyl", response_model=
|
342 |
def sibyl_system(
|
343 |
item: SibylSystem,
|
344 |
api_key: None = Depends(validate_api_key)
|
345 |
):
|
346 |
-
|
347 |
-
if
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
|
|
|
|
|
|
|
|
354 |
)
|
355 |
else:
|
356 |
-
return
|
357 |
-
sibyl_name="",
|
358 |
-
reason="",
|
359 |
-
is_banned=False,
|
360 |
-
date_joined="",
|
361 |
-
sibyl_user_id=0
|
362 |
-
)
|
363 |
|
364 |
@app.get("/ryuzaki/ai", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
365 |
def ryuzaki_ai(
|
|
|
338 |
except Exception as e:
|
339 |
return ErrorStatus(status="false", message=f"Internal server error: {str(e)}")
|
340 |
|
341 |
+
@app.get("/ryuzaki/sibyl", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
342 |
def sibyl_system(
|
343 |
item: SibylSystem,
|
344 |
api_key: None = Depends(validate_api_key)
|
345 |
):
|
346 |
+
sibyl_result = get_sibyl_system_banned(item.user_id)
|
347 |
+
if sibyl_result is not None:
|
348 |
+
sibyl_name, reason, is_banned, date_joined, sibyl_user_id = sibyl_result
|
349 |
+
return SuccessResponse(
|
350 |
+
status="True",
|
351 |
+
randydev={
|
352 |
+
"sibyl_name": sibyl_name,
|
353 |
+
"reason": reason,
|
354 |
+
"is_banned": is_banned,
|
355 |
+
"date_joined": date_joined,
|
356 |
+
"sibyl_user_id": sibyl_user_id
|
357 |
+
}
|
358 |
)
|
359 |
else:
|
360 |
+
return ErrorStatus(status="false", message="Not found user")
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
|
362 |
@app.get("/ryuzaki/ai", response_model=SuccessResponse, responses={422: {"model": ErrorStatus}})
|
363 |
def ryuzaki_ai(
|