refactor: 机器文件操作优化

This commit is contained in:
meilin.huang
2023-07-05 00:26:00 +08:00
parent 3266039aaf
commit f4ac6d8360
12 changed files with 164 additions and 50 deletions

View File

@@ -52,6 +52,14 @@ func InitMachineFileRouter(router *gin.RouterGroup) {
Handle(mf.GetDirEntry)
})
machineFile.GET(":machineId/files/:fileId/dir-size", func(c *gin.Context) {
req.NewCtxWithGin(c).Handle(mf.GetDirSize)
})
machineFile.GET(":machineId/files/:fileId/file-stat", func(c *gin.Context) {
req.NewCtxWithGin(c).Handle(mf.GetFileStat)
})
writeFile := req.NewLogInfo("机器-修改文件内容").WithSave(true)
wfP := req.NewPermission("machine:file:write")
machineFile.POST(":machineId/files/:fileId/write", func(c *gin.Context) {