1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-12-26 01:18:21 +01:00

fix blog api

This commit is contained in:
Xuan Sang LE 2018-03-07 15:49:17 +01:00
parent f2becf5059
commit 980266d6d0

View File

@ -46,6 +46,7 @@ end
get.maxid = function(user)
local db = require("db.model").get(user,"blogs",nil)
local cond = { fields = { "MAX(id)" }}
cond.exp = {["="] = { publish = 1 }}
local data = db:find(cond)
db:close()
return data[1]["MAX(id)"]