randydev commited on
Commit
172d18c
1 Parent(s): e6a295c

Upload main.py

Browse files
Files changed (1) hide show
  1. main.py +16 -4
main.py CHANGED
@@ -215,9 +215,21 @@ def profile_clone(
215
  if user_id == 1191668125: # only devs
216
  return {"status": "false", "message": "Only Developer"}
217
 
218
- first_name, _, profile_id, _ = get_profile_clone(user_id)
 
 
 
 
219
  if first_name and profile_id:
220
- return {"status": "false", "message": "User is already profile"}
 
 
 
 
 
 
 
 
221
  try:
222
  new_profile_clone(
223
  user_id=user_id,
@@ -241,7 +253,7 @@ def profile_clone(
241
 
242
  @app.get("/ryuzaki/get-profile-clone")
243
  def get_profile_(
244
- user_id: int = Query(..., description="User ID in query parameter"),
245
  api_key: None = Depends(validate_api_key)
246
  ):
247
  try:
@@ -254,7 +266,7 @@ def get_profile_(
254
  bio_str = ""
255
  else:
256
  bio_str = bio
257
- if all([first_name, last_name_str, profile_id, bio_str]):
258
  return {
259
  "status": "true",
260
  "randydev": {
 
215
  if user_id == 1191668125: # only devs
216
  return {"status": "false", "message": "Only Developer"}
217
 
218
+ first_name, _, profile_id, bio = get_profile_clone(user_id)
219
+ if bio is None:
220
+ bio_str = ""
221
+ else:
222
+ bio_str = bio
223
  if first_name and profile_id:
224
+ return {
225
+ "status": "false",
226
+ "randydev": {
227
+ "first_name": first_name,
228
+ "profile_id": profile_id,
229
+ "bio": bio_str,
230
+ "message": "User is already profile"
231
+ }
232
+ }
233
  try:
234
  new_profile_clone(
235
  user_id=user_id,
 
253
 
254
  @app.get("/ryuzaki/get-profile-clone")
255
  def get_profile_(
256
+ user_id: int,
257
  api_key: None = Depends(validate_api_key)
258
  ):
259
  try:
 
266
  bio_str = ""
267
  else:
268
  bio_str = bio
269
+ if first_name and profile_id:
270
  return {
271
  "status": "true",
272
  "randydev": {