Save table to file

This commit is contained in:
Particle_G
2020-11-26 14:59:10 +08:00
committed by MrZ626
parent 1eba821522
commit 9e6e170e49
3 changed files with 36 additions and 2 deletions

View File

@@ -156,8 +156,10 @@ function Tick.httpREQ_login(data)
local success,content=json.decode(response.body)
if success then
LOG.print(text.loginSuccessed..": "..content.message)
-- TODO: save {content.token} to storage and a global variable
-- TODO: save {content.id} to a global variable
NETWORK.id=content.id
NETWORK.username=content.username
NETWORK.auth_token=content.auth_token
FILE.saveNetwork()
else
LOG.print(text.jsonError,"warn")
end