Junaidb commited on
Commit
badf3bc
·
verified ·
1 Parent(s): 56db486

Update register.py

Browse files
Files changed (1) hide show
  1. register.py +21 -2
register.py CHANGED
@@ -1,7 +1,10 @@
1
  import streamlit as st
2
  import requests
 
3
 
4
 
 
 
5
 
6
  def REGISTER():
7
  st.text("Account Activation")
@@ -13,11 +16,27 @@ def REGISTER():
13
  password=st.text_input("setup a password")
14
  if st.button("register"):
15
 
16
- response=requests.post("",json={},headers={})
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  status=response.json()
18
  if status==True:
 
19
  st.session_state.registered=True
20
  st.rerun()
21
- else:
 
 
22
  st.error("ERROR while registering......")
23
 
 
1
  import streamlit as st
2
  import requests
3
+ import os
4
 
5
 
6
+ tok=os.getenv("TOK")
7
+
8
 
9
  def REGISTER():
10
  st.text("Account Activation")
 
16
  password=st.text_input("setup a password")
17
  if st.button("register"):
18
 
19
+ response=requests.post("https://thexforce-combat-backend.hf.space/registerorg",json={
20
+
21
+ "name":name,
22
+ "operation":operation,
23
+ "username":username
24
+ "password":password
25
+
26
+
27
+ },headers={
28
+
29
+ "Content-Type":"application/json",
30
+ "Authorization":f"Bearer {tok}"
31
+ })
32
+
33
  status=response.json()
34
  if status==True:
35
+
36
  st.session_state.registered=True
37
  st.rerun()
38
+
39
+ elif status ==False:
40
+
41
  st.error("ERROR while registering......")
42