feat(backend): implement layered session timeout and enhanced download control for web proxy

This commit is contained in:
pycook
2025-08-03 21:03:51 +08:00
parent dd11bf67ce
commit 2ef67fd396
10 changed files with 799 additions and 349 deletions

View File

@@ -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...)
}
}