Move self test to rest v2

This commit is contained in:
Alfredo Cardigliano 2023-02-13 17:08:16 +01:00
parent c3efb7d04d
commit a6f403d8bf
2 changed files with 6 additions and 2 deletions

View file

@ -0,0 +1,18 @@
--
-- (C) 2013-23 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
if((dirs.scriptdir ~= nil) and (dirs.scriptdir ~= "")) then package.path = dirs.scriptdir .. "/lua/modules/?.lua;" .. package.path end
require "lua_utils"
local json = require "dkjson"
local rest_utils = require "rest_utils"
sendHTTPContentTypeHeader('application/json')
local rc = rest_utils.consts.success.ok
local res = {}
rest_utils.answer(rc, res)