|
@@ -5,6 +5,7 @@ import org.lym.pom.service.ImageStorageService;
|
|
|
import org.shoulder.core.dto.response.BaseResult;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -39,8 +40,8 @@ public class ImageController {
|
|
|
storageService.downloadImage(imageId, response);
|
|
|
}
|
|
|
|
|
|
- @GetMapping("{resourceIdOrPath}")
|
|
|
- public BaseResult<Boolean> downloadImage(@PathVariable("resourceIdOrPath") String imageId) throws IOException {
|
|
|
+ @DeleteMapping("{resourceIdOrPath}")
|
|
|
+ public BaseResult<Boolean> deleteImage(@PathVariable("resourceIdOrPath") String imageId) throws IOException {
|
|
|
return BaseResult.success(storageService.deleteImage(imageId));
|
|
|
}
|
|
|
|