mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-12-26 01:18:21 +01:00
update OS backend
This commit is contained in:
parent
bac46c691a
commit
ce99218348
4
Makefile
4
Makefile
@ -5,8 +5,8 @@ main: copy
|
|||||||
for f in $(PROJS); do BUILDDIR=$(BUILDDIR)/"$${f}" make -C "$${f}" ; done
|
for f in $(PROJS); do BUILDDIR=$(BUILDDIR)/"$${f}" make -C "$${f}" ; done
|
||||||
|
|
||||||
copy:
|
copy:
|
||||||
cp -rf $(copyfiles) $(BUILDDIR)
|
cp -rfv $(copyfiles) $(BUILDDIR)
|
||||||
cp -r silk $(BUILDDIR)
|
cp -rv silk $(BUILDDIR)
|
||||||
|
|
||||||
ar:
|
ar:
|
||||||
-[ -d /tmp/antd_web_apps ] && rm -r /tmp/antd_web_apps
|
-[ -d /tmp/antd_web_apps ] && rm -r /tmp/antd_web_apps
|
||||||
|
@ -98,6 +98,7 @@ function SystemController:application(...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function SystemController:apigateway(...)
|
function SystemController:apigateway(...)
|
||||||
|
local args={...}
|
||||||
local use_ws = false
|
local use_ws = false
|
||||||
if REQUEST and REQUEST.ws == "1" then
|
if REQUEST and REQUEST.ws == "1" then
|
||||||
-- override the global echo command
|
-- override the global echo command
|
||||||
@ -189,8 +190,15 @@ function SystemController:apigateway(...)
|
|||||||
exec_with_user_priv(REQUEST)
|
exec_with_user_priv(REQUEST)
|
||||||
elseif REQUEST.json then
|
elseif REQUEST.json then
|
||||||
data = JSON.decodeString(REQUEST.json)
|
data = JSON.decodeString(REQUEST.json)
|
||||||
--std.json()
|
|
||||||
exec_with_user_priv(data)
|
exec_with_user_priv(data)
|
||||||
|
elseif args and #args > 0 then
|
||||||
|
local decoded = std.b64decode(args[1])
|
||||||
|
data = JSON.decodeString(bytes.__tostring(decoded))
|
||||||
|
if data and data.path then
|
||||||
|
exec_with_user_priv(data)
|
||||||
|
else
|
||||||
|
fail("Unknown request")
|
||||||
|
end
|
||||||
else
|
else
|
||||||
fail("Unkown request")
|
fail("Unkown request")
|
||||||
end
|
end
|
||||||
|
@ -35,6 +35,8 @@ function is_auth()
|
|||||||
-- should be used only by API call
|
-- should be used only by API call
|
||||||
elseif REQUEST.sessionid and REQUEST.sessionid ~= '0' then
|
elseif REQUEST.sessionid and REQUEST.sessionid ~= '0' then
|
||||||
sessionid = REQUEST.sessionid
|
sessionid = REQUEST.sessionid
|
||||||
|
elseif REQUEST.access_token and REQUEST.access_token ~= '0' then
|
||||||
|
sessionid = REQUEST.access_token
|
||||||
end
|
end
|
||||||
if sessionid == nil then
|
if sessionid == nil then
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user