(ctx echo.Context)
| 791 | } |
| 792 | |
| 793 | func DeleteOperateFileOrDir(ctx echo.Context) error { |
| 794 | id := ctx.Param("id") |
| 795 | if id == "0" { |
| 796 | service.FileQueue = sync.Map{} |
| 797 | service.OpStrArr = []string{} |
| 798 | } else { |
| 799 | |
| 800 | service.FileQueue.Delete(id) |
| 801 | tempList := []string{} |
| 802 | for _, v := range service.OpStrArr { |
| 803 | if v != id { |
| 804 | tempList = append(tempList, v) |
| 805 | } |
| 806 | } |
| 807 | service.OpStrArr = tempList |
| 808 | |
| 809 | } |
| 810 | |
| 811 | go service.MyService.Notify().SendFileOperateNotify(true) |
| 812 | return ctx.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS)}) |
| 813 | } |
| 814 | |
| 815 | func GetSize(ctx echo.Context) error { |
| 816 | json := make(map[string]string) |
nothing calls this directly
no test coverage detected