rdp-studio commited on
Commit
cdbde12
1 Parent(s): a46961e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -89,7 +89,7 @@ def login_up_nft(info, u_verify, u_id, u_key, sid, cid, ava_image, log_into_publ
89
  result, code = card_id_set_ava(cid, u_key, img_data)
90
  tz = timezone('Asia/Shanghai')
91
  now = datetime.datetime.now(tz)
92
- print("UID: ", u_id, " 提交完成: ", datetime.datetime.strptime(now, '%Y-%m-%d %H:%M:%S'))
93
  if result:
94
  GLOBAL_STATE_SUCCESS = GLOBAL_STATE_SUCCESS + 1
95
  SUCCESS_UIDS.append({"uid": u_id, "time": now})
@@ -102,7 +102,7 @@ def status():
102
  global GLOBAL_STATE_SUCCESS, SUCCESS_UIDS
103
  text = "自本次更新/系统重启以来,已成功为用户设置 " + str(GLOBAL_STATE_SUCCESS) + " 次头像。"
104
  for u in SUCCESS_UIDS:
105
- text = text + "\n" + "UID: " + u["uid"] + " 于 " + datetime.datetime.strptime(u["time"], '%Y-%m-%d %H:%M:%S') + " 成功设置数字头像。"
106
  return text
107
 
108
  with gr.Blocks() as application:
 
89
  result, code = card_id_set_ava(cid, u_key, img_data)
90
  tz = timezone('Asia/Shanghai')
91
  now = datetime.datetime.now(tz)
92
+ print("UID: ", u_id, " 提交完成: ", now.strftime('%Y-%m-%d %H:%M:%S'))
93
  if result:
94
  GLOBAL_STATE_SUCCESS = GLOBAL_STATE_SUCCESS + 1
95
  SUCCESS_UIDS.append({"uid": u_id, "time": now})
 
102
  global GLOBAL_STATE_SUCCESS, SUCCESS_UIDS
103
  text = "自本次更新/系统重启以来,已成功为用户设置 " + str(GLOBAL_STATE_SUCCESS) + " 次头像。"
104
  for u in SUCCESS_UIDS:
105
+ text = text + "\n" + "UID: " + u["uid"] + " 于 " + u["time"].strftime('%Y-%m-%d %H:%M:%S') + " 成功设置数字头像。"
106
  return text
107
 
108
  with gr.Blocks() as application: