mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
i18n: objects / share / slave / tag operations
This commit is contained in:
@@ -142,13 +142,13 @@ func PreviewShareReadme(c *gin.Context) {
|
||||
allowFileName := []string{"readme.txt", "readme.md"}
|
||||
fileName := strings.ToLower(path.Base(service.Path))
|
||||
if !util.ContainsString(allowFileName, fileName) {
|
||||
c.JSON(200, serializer.ParamErr("非README文件", nil))
|
||||
c.JSON(200, serializer.ParamErr("Not a README file", nil))
|
||||
}
|
||||
|
||||
// 必须是目录分享
|
||||
if shareCtx, ok := c.Get("share"); ok {
|
||||
if !shareCtx.(*model.Share).IsDir {
|
||||
c.JSON(200, serializer.ParamErr("此分享无自述文件", nil))
|
||||
c.JSON(200, serializer.ParamErr("This share has no README file", nil))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user