(writer http.ResponseWriter, request *http.Request)
| 133 | } |
| 134 | |
| 135 | func (this *ImageCacheController) DeleteBatch(writer http.ResponseWriter, request *http.Request) *result.WebResult { |
| 136 | |
| 137 | uuids := request.FormValue("uuids") |
| 138 | if uuids == "" { |
| 139 | panic(result.BadRequest("uuids cannot be null")) |
| 140 | } |
| 141 | |
| 142 | uuidArray := strings.Split(uuids, ",") |
| 143 | |
| 144 | for _, uuid := range uuidArray { |
| 145 | |
| 146 | imageCache := this.imageCacheDao.FindByUuid(uuid) |
| 147 | |
| 148 | user := this.checkUser(request) |
| 149 | if imageCache.UserUuid != user.Uuid { |
| 150 | panic(result.UNAUTHORIZED) |
| 151 | } |
| 152 | |
| 153 | this.imageCacheDao.Delete(imageCache) |
| 154 | |
| 155 | } |
| 156 | |
| 157 | return this.Success("OK") |
| 158 | } |
nothing calls this directly
no test coverage detected