fix: only file have raw_url

refactor/fs
Noah Hsu 2022-07-08 15:56:29 +08:00
parent 90283ef29c
commit e28c1e436d
1 changed files with 19 additions and 17 deletions

View File

@ -161,7 +161,8 @@ func FsGet(c *gin.Context) {
return
}
var rawURL string
// obj have raw url
// file have raw url
if !obj.IsDir() {
if u, ok := obj.(model.URL); ok {
rawURL = u.URL()
} else {
@ -182,6 +183,7 @@ func FsGet(c *gin.Context) {
rawURL = link.URL
}
}
}
common.SuccessResp(c, FsGetResp{
ObjResp: ObjResp{
Name: obj.GetName(),