1
0
mirror of https://github.com/lxsang/antd-lua-plugin synced 2025-07-23 01:09:59 +02:00
This commit is contained in:
lxsang
2020-01-02 17:51:08 +01:00
parent e42e19e838
commit 03df9ae4a6
110 changed files with 331 additions and 1307 deletions

View File

@ -3,6 +3,8 @@ __ROOT__ = __api__.root
-- set require path
package.path = __ROOT__ .. '/?.lua;'..__api__.apiroot..'/?.lua'
package.cpath = __api__.apiroot..'/?.so'
require("antd")
require("std")
require("utils")
require("extra_mime")

View File

@ -1,4 +1,4 @@
sqlite = modules.sqlite()
sqlite = modules.sqlite()
if sqlite == nil then return 0 end
require("OOP")

View File

@ -1,6 +1,17 @@
std = modules.std()
bytes = modules.bytes()
array = modules.array()
modules.sqlite = function()
if not sqlite then
sqlite = require("sqlitedb")
sqlite.getdb = function(s)
return sqlite._getdb(__api__.dbpath.."/"..s..".db")
end
end
return sqlite
end
RESPONSE_HEADER = {
status = 200,
header = {},

View File

@ -83,7 +83,7 @@ function utils.url_parser(uri)
return obj
end
JSON = modules.JSON()
JSON = require("json")
function JSON.encode(obj)
local t = type(obj)