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:
parent
8fc5273509
commit
9a2e8910f4
@ -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
|
||||
@ -113,6 +115,8 @@ function M.associate_POST(request, response)
|
||||
end
|
||||
response:addPostResponseFunction(associate)
|
||||
|
||||
|
||||
|
||||
--[[local helloA = function()
|
||||
local log = require('util.logger')
|
||||
log:info("HELLO A")
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user