(c *gin.Context)
| 106 | } |
| 107 | |
| 108 | func ClearIndex(c *gin.Context) { |
| 109 | if search.Running() { |
| 110 | common.ErrorStrResp(c, "index is running", 400) |
| 111 | return |
| 112 | } |
| 113 | search.Clear(c) |
| 114 | search.WriteProgress(&model.IndexProgress{ |
| 115 | ObjCount: 0, |
| 116 | IsDone: true, |
| 117 | LastDoneTime: nil, |
| 118 | Error: "", |
| 119 | }) |
| 120 | common.SuccessResp(c) |
| 121 | } |
| 122 | |
| 123 | func GetProgress(c *gin.Context) { |
| 124 | progress, err := search.Progress() |
nothing calls this directly
no test coverage detected