0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-12-22 11:03:48 +01:00

Added signin api call (mostly for debugging)

This commit is contained in:
peteruithoven 2013-10-02 14:42:27 +02:00
parent 8fc5273509
commit 9a2e8910f4

View File

@ -1,8 +1,10 @@
local log = require('util.logger')
local settings = require('util.settings')
local utils = require('util.utils')
local netconf = require('network.netconfig')
local wifi = require('network.wlanconfig')
local ResponseClass = require('rest.response')
local signin = require('network.signin')
local M = {
isApi = true
@ -108,10 +110,12 @@ function M.associate_POST(request, response)
return
end
local associate = function()
local rv,msg = netconf.associateSsid(argSsid, argPhrase, argRecreate)
local associate = function()
local rv,msg = netconf.associateSsid(argSsid, argPhrase, argRecreate)
end
response:addPostResponseFunction(associate)
response:addPostResponseFunction(associate)
--[[local helloA = function()
local log = require('util.logger')
@ -172,4 +176,15 @@ function M.remove_POST(request, response)
end
end
function M.signin(request, response)
log:info("API:Network:signin")
if signin.signin() then
log:info("API:Network:signed in")
response:setSuccess("API:Network:signed in")
else
log:info("API:Network:Signing in failed")
response:setError("Signing in failed")
end
end
return M