mirror of
https://github.com/lxsang/antd-lua-plugin
synced 2025-07-23 01:09:59 +02:00
clean up
This commit is contained in:
@ -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")
|
||||
|
@ -1,4 +1,4 @@
|
||||
sqlite = modules.sqlite()
|
||||
sqlite = modules.sqlite()
|
||||
|
||||
if sqlite == nil then return 0 end
|
||||
require("OOP")
|
||||
|
11
APIs/std.lua
11
APIs/std.lua
@ -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 = {},
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user