feat: apply various dashboard and auth fixes including demo trials, settings UI, and signup options
This commit is contained in:
12
test.py
Normal file
12
test.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import urllib.request, json
|
||||
req = urllib.request.Request('http://localhost:8000/api/auth/login', data=b'{"email":"demo@pragativeer.com","password":"Pv9#kL2$mQ8!vX4@"}', headers={'Content-Type': 'application/json'})
|
||||
res = urllib.request.urlopen(req)
|
||||
data = json.loads(res.read().decode())
|
||||
token = data['token']
|
||||
|
||||
req2 = urllib.request.Request('http://localhost:8000/api/admin/settings', headers={'Authorization': 'Bearer ' + token})
|
||||
try:
|
||||
res2 = urllib.request.urlopen(req2)
|
||||
print("SETTINGS:", res2.read().decode())
|
||||
except urllib.error.HTTPError as e:
|
||||
print("ERR SETTINGS:", e.code, e.read().decode())
|
||||
Reference in New Issue
Block a user