remove http/ual.lua
This commit is contained in:
parent
6189a49f93
commit
60a95c420d
25
http/ual.lua
25
http/ual.lua
@ -1,25 +0,0 @@
|
|||||||
local function storelist(table)
|
|
||||||
file.remove("http/aplist.json")
|
|
||||||
file.open("http/aplist.json","w")
|
|
||||||
coroutine.yield()
|
|
||||||
file.write(cjson.encode(table))
|
|
||||||
file.close()
|
|
||||||
print(cjson.encode(table))
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function sendHeader(connection)
|
|
||||||
connection:send("HTTP/1.0 200 OK\r\nContent-Type: application/json\r\nCache-Control: private, no-store\r\n\r\n")
|
|
||||||
connection:send('{"error":0, "message":"OK"}')
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return function(connection,args)
|
|
||||||
sendHeader(connection)
|
|
||||||
wifi.sta.getap(storelist)
|
|
||||||
end
|
|
||||||
Loading…
x
Reference in New Issue
Block a user