File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ type Meta struct {
1212 Hide string `json:"hide"`
1313 Upload bool `json:"upload"`
1414 OnlyShows string `json:"only_shows"`
15+ Readme string `json:"readme"`
1516}
1617
1718func GetMetaByPath (path string ) (* Meta , error ) {
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ type Meta struct {
6060 Driver string `json:"driver"`
6161 Upload bool `json:"upload"`
6262 Total int `json:"total"`
63+ Readme string `json:"readme"`
6364 //Pages int `json:"pages"`
6465}
6566
@@ -75,8 +76,10 @@ func Path(c *gin.Context) {
7576 _ , ok := c .Get ("admin" )
7677 meta , _ := model .GetMetaByPath (req .Path )
7778 upload := false
78- if meta != nil && meta .Upload {
79- upload = true
79+ readme := ""
80+ if meta != nil {
81+ upload = meta .Upload
82+ readme = meta .Readme
8083 }
8184 err := CheckPagination (& req )
8285 if err != nil {
@@ -137,6 +140,7 @@ func Path(c *gin.Context) {
137140 Driver : driverName ,
138141 Upload : upload ,
139142 Total : total ,
143+ Readme : readme ,
140144 },
141145 Files : files ,
142146 },
You can’t perform that action at this time.
0 commit comments