ntopng/scripts/lua/get_new_blog_posts.lua
gabryon99 633ee3096d reworked blog notifications
now the notification are stored in redis and not anymore in browser local storage
2020-04-02 23:04:03 +02:00

17 lines
377 B
Lua

--
-- (C) 2020 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
local json = require("dkjson")
local blog_utils = require("blog_utils")
sendHTTPContentTypeHeader('application/json')
print(json.encode({
success = true,
posts = blog_utils.readPostsFromRedis(_SESSION['user'])
}))