bugfix: 1. 修复私有问题访问bug;2. 重构私有文档访问逻辑代码;3. shell生成zip包中,删除go文件。 resolves mindoc-org/mindoc#751, resolves mindoc-org/mindoc#801

This commit is contained in:
Go-Go-Farther
2022-07-05 11:59:23 +08:00
parent b4b7528e3f
commit 0b83a53b56
6 changed files with 89 additions and 41 deletions

View File

@@ -11,6 +11,7 @@ import (
"github.com/beego/beego/v2/core/logs"
"github.com/beego/beego/v2/server/web"
"github.com/beego/beego/v2/server/web/context"
// "github.com/mindoc-org/mindoc/conf"
"github.com/mindoc-org/mindoc/controllers"
)
@@ -243,6 +244,7 @@ func init() {
web.Router("/history/restore", &controllers.DocumentController{}, "*:RestoreHistory")
web.Router("/docs/:key", &controllers.DocumentController{}, "*:Index")
web.Router("/docs/:key/check-password", &controllers.DocumentController{}, "post:CheckPassword")
web.Router("/docs/:key/:id", &controllers.DocumentController{}, "*:Read")
web.Router("/docs/:key/search", &controllers.DocumentController{}, "post:Search")
web.Router("/export/:key", &controllers.DocumentController{}, "*:Export")