mirror of
https://github.com/cloudreve/Cloudreve.git
synced 2026-11-05 16:38:06 +00:00
Feat: unit test coverage report
This commit is contained in:
1 parent
5424115e51
commit
c09fc535dc
6 files changed
+168
-24
No files matched your search
@@ -35,3 +35,18 @@ func Move(c *gin.Context) {
|
||||
c.JSON(200, ErrorResponse(err))
|
||||
}
|
||||
}
|
||||
|
||||
// Copy 复制文件或目录
|
||||
func Copy(c *gin.Context) {
|
||||
// 创建上下文
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
var service explorer.ItemMoveService
|
||||
if err := c.ShouldBindJSON(&service); err == nil {
|
||||
res := service.Copy(ctx, c)
|
||||
c.JSON(200, res)
|
||||
} else {
|
||||
c.JSON(200, ErrorResponse(err))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user