mirror of
https://github.com/veops/oneterm.git
synced 2025-10-16 04:10:39 +08:00
feat(backend): implement layered session timeout and enhanced download control for web proxy
This commit is contained in:
@@ -96,8 +96,10 @@ func (c *Controller) GetNodes(ctx *gin.Context) {
|
||||
db = db.Select("id", "parent_id", "name", "authorization")
|
||||
}
|
||||
|
||||
db = db.Order("id ASC")
|
||||
|
||||
if recursive {
|
||||
treeNodes, err := nodeService.GetNodesTree(ctx, db, !info, config.RESOURCE_NODE)
|
||||
treeNodes, err := nodeService.GetNodesTree(ctx, db, false, config.RESOURCE_NODE)
|
||||
if err != nil {
|
||||
ctx.AbortWithError(http.StatusInternalServerError, &errors.ApiError{Code: errors.ErrInternal, Data: map[string]any{"err": err}})
|
||||
return
|
||||
@@ -110,7 +112,7 @@ func (c *Controller) GetNodes(ctx *gin.Context) {
|
||||
|
||||
ctx.JSON(http.StatusOK, NewHttpResponseWithData(res))
|
||||
} else {
|
||||
doGet(ctx, !info, db, config.RESOURCE_NODE, nodePostHooks...)
|
||||
doGet(ctx, false, db, config.RESOURCE_NODE, nodePostHooks...)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user