mirror of
https://github.com/lxsang/antd-web-apps
synced 2025-07-26 18:49:47 +02:00
update: working version compatible with the latest version of silk and antd
All checks were successful
gitea-sync/antd-web-apps/pipeline/head This commit looks good
All checks were successful
gitea-sync/antd-web-apps/pipeline/head This commit looks good
This commit is contained in:
@ -11,8 +11,8 @@ if HEADER.Host then
|
||||
else
|
||||
HTTP_ROOT = "https://info.iohub.dev"
|
||||
end
|
||||
-- TODO remove me
|
||||
HTTP_ROOT = HTTP_ROOT.."/next/info"
|
||||
|
||||
DB_LOC="/opt/www/databases"
|
||||
|
||||
CONTROLLER_ROOT = "info.controllers"
|
||||
MODEL_ROOT = "info.models"
|
||||
@ -25,9 +25,10 @@ local REGISTRY = {}
|
||||
-- set logging level
|
||||
REGISTRY.logger = Logger:new{ level = Logger.INFO}
|
||||
REGISTRY.users_allowed = { phuong = true, mrsang = true, dany = true }
|
||||
-- TODO change me
|
||||
REGISTRY.user = "dany"
|
||||
REGISTRY.dbfile = "/home/"..REGISTRY.user.."/databases/"..REGISTRY.user..".db"
|
||||
|
||||
REGISTRY.user = "mrsang"
|
||||
|
||||
REGISTRY.dbfile = DB_LOC.."/"..REGISTRY.user..".db"
|
||||
|
||||
REGISTRY.db = DBModel:new{db=REGISTRY.dbfile}
|
||||
REGISTRY.layout = 'default'
|
||||
@ -72,7 +73,7 @@ function NotfoundController:index(...)
|
||||
REQUEST.r = ulib.trim(REQUEST.r:gsub(user, ""), "/")
|
||||
if REGISTRY.db then REGISTRY.db:close() end
|
||||
REGISTRY.user = user
|
||||
REGISTRY.dbfile = "/home/"..REGISTRY.user.."/databases/"..REGISTRY.user..".db"
|
||||
REGISTRY.dbfile = DB_LOC.."/"..REGISTRY.user..".db"
|
||||
REGISTRY.db = DBModel:new{db=REGISTRY.dbfile}
|
||||
REGISTRY.db:open()
|
||||
router:delegate()
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript" src="<?=HTTP_ROOT?>/rst/gscripts/showdown.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<?=HTTP_ROOT?>/style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
|
||||
|
||||
|
Reference in New Issue
Block a user