Change network functions

This commit is contained in:
Particle_G
2020-11-27 22:14:17 +08:00
committed by MrZ626
parent 654a5b9dfe
commit 5439f30f64
4 changed files with 65 additions and 4 deletions

View File

@@ -117,6 +117,23 @@ function Tmr.load()
SFX.play("welcome_sfx")
VOC.play("welcome_voc")
httpRequest(TICK.httpREQ_launch,"/tech/api/v1/app/info")
if ACCOUNT.auth_token then
local success,data=json.encode({
email=ACCOUNT.email,
auth_token=ACCOUNT.auth_token,
})
if not success then
LOG.print(text.jsonError,"warn")
else
httpRequest(
TICK.httpREQ_autoLogin,
"/tech/api/v1/users",
"GET",
{["Content-Type"]="application/json"},
data
)
end
end
end
if S.tar then
S.cur=S.cur+1