(c *gin.Context)
| 262 | } |
| 263 | |
| 264 | func FsGetSplit(c *gin.Context) { |
| 265 | var req FsGetReq |
| 266 | if err := c.ShouldBind(&req); err != nil { |
| 267 | common.ErrorResp(c, err, 400) |
| 268 | return |
| 269 | } |
| 270 | if strings.HasPrefix(req.Path, "/@s") { |
| 271 | req.Path = strings.TrimPrefix(req.Path, "/@s") |
| 272 | SharingGet(c, &req) |
| 273 | return |
| 274 | } |
| 275 | user := c.Request.Context().Value(conf.UserKey).(*model.User) |
| 276 | if user.IsGuest() && user.Disabled { |
| 277 | common.ErrorStrResp(c, "Guest user is disabled, login please", 401) |
| 278 | return |
| 279 | } |
| 280 | FsGet(c, &req, user) |
| 281 | } |
| 282 | |
| 283 | func FsGet(c *gin.Context, req *FsGetReq, user *model.User) { |
| 284 | reqPath, err := user.JoinPath(req.Path) |
nothing calls this directly
no test coverage detected