Update api path, add global table (#16)

This commit is contained in:
Particle_G
2020-12-02 23:51:30 +08:00
committed by MrZ626
parent cd3eab103c
commit ac701c4759
13 changed files with 132 additions and 10 deletions

View File

@@ -116,8 +116,8 @@ function Tmr.load()
LOADED=true
SFX.play("welcome_sfx")
VOC.play("welcome_voc")
httpRequest(TICK.httpREQ_launch,"/tech/api/v1/app/info")
if ACCOUNT.auth_token then
httpRequest(TICK.httpREQ_launch,PATH.api..PATH.appInfo)
if ACCOUNT.auth_token and ACCOUNT.email then
local res=json.encode{
email=ACCOUNT.email,
auth_token=ACCOUNT.auth_token,
@@ -125,7 +125,7 @@ function Tmr.load()
if res then
httpRequest(
TICK.httpREQ_autoLogin,
"/tech/api/v1/users",
PATH.api..PATH.auth,
"GET",
{["Content-Type"]="application/json"},
res