mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2024-12-22 19:13:49 +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 settings = require('util.settings')
|
||||||
local utils = require('util.utils')
|
local utils = require('util.utils')
|
||||||
local netconf = require('network.netconfig')
|
local netconf = require('network.netconfig')
|
||||||
local wifi = require('network.wlanconfig')
|
local wifi = require('network.wlanconfig')
|
||||||
local ResponseClass = require('rest.response')
|
local ResponseClass = require('rest.response')
|
||||||
|
local signin = require('network.signin')
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
isApi = true
|
isApi = true
|
||||||
@ -113,6 +115,8 @@ function M.associate_POST(request, response)
|
|||||||
end
|
end
|
||||||
response:addPostResponseFunction(associate)
|
response:addPostResponseFunction(associate)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--[[local helloA = function()
|
--[[local helloA = function()
|
||||||
local log = require('util.logger')
|
local log = require('util.logger')
|
||||||
log:info("HELLO A")
|
log:info("HELLO A")
|
||||||
@ -172,4 +176,15 @@ function M.remove_POST(request, response)
|
|||||||
end
|
end
|
||||||
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
|
return M
|
||||||
|
Loading…
Reference in New Issue
Block a user