feat: add readme field to list resp
This commit is contained in:
@ -59,7 +59,7 @@ func whetherHide(user *model.User, meta *model.Meta, path string) bool {
|
||||
return false
|
||||
}
|
||||
// if meta doesn't apply to sub_folder, don't hide
|
||||
if !utils.PathEqual(meta.Path, path) && !meta.SubFolder {
|
||||
if !utils.PathEqual(meta.Path, path) && !meta.HSub {
|
||||
return false
|
||||
}
|
||||
// if is guest, hide
|
||||
|
@ -1,11 +1,14 @@
|
||||
package model
|
||||
|
||||
type Meta struct {
|
||||
ID uint `json:"id" gorm:"primaryKey"`
|
||||
Path string `json:"path" gorm:"unique" binding:"required"`
|
||||
Password string `json:"password"`
|
||||
Write bool `json:"upload"`
|
||||
Hide string `json:"hide"`
|
||||
SubFolder bool `json:"sub_folder"`
|
||||
Readme string `json:"readme"`
|
||||
ID uint `json:"id" gorm:"primaryKey"`
|
||||
Path string `json:"path" gorm:"unique" binding:"required"`
|
||||
Password string `json:"password"`
|
||||
PSub bool `json:"p_sub"`
|
||||
Write bool `json:"write"`
|
||||
WSub bool `json:"w_sub"`
|
||||
Hide string `json:"hide"`
|
||||
HSub bool `json:"h_sub"`
|
||||
Readme string `json:"readme"`
|
||||
RSub bool `json:"r_sub"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user