mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-12-25 00:48:22 +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
|
||||
|
||||
copy:
|
||||
cp -rf $(copyfiles) $(BUILDDIR)
|
||||
cp -r silk $(BUILDDIR)
|
||||
cp -rfv $(copyfiles) $(BUILDDIR)
|
||||
cp -rv silk $(BUILDDIR)
|
||||
|
||||
ar:
|
||||
-[ -d /tmp/antd_web_apps ] && rm -r /tmp/antd_web_apps
|
||||
|
@ -98,6 +98,7 @@ function SystemController:application(...)
|
||||
end
|
||||
|
||||
function SystemController:apigateway(...)
|
||||
local args={...}
|
||||
local use_ws = false
|
||||
if REQUEST and REQUEST.ws == "1" then
|
||||
-- override the global echo command
|
||||
@ -189,8 +190,15 @@ function SystemController:apigateway(...)
|
||||
exec_with_user_priv(REQUEST)
|
||||
elseif REQUEST.json then
|
||||
data = JSON.decodeString(REQUEST.json)
|
||||
--std.json()
|
||||
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
|
||||
fail("Unkown request")
|
||||
end
|
||||
|
@ -35,6 +35,8 @@ function is_auth()
|
||||
-- should be used only by API call
|
||||
elseif REQUEST.sessionid and REQUEST.sessionid ~= '0' then
|
||||
sessionid = REQUEST.sessionid
|
||||
elseif REQUEST.access_token and REQUEST.access_token ~= '0' then
|
||||
sessionid = REQUEST.access_token
|
||||
end
|
||||
if sessionid == nil then
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user