wudi 5 лет назад
Родитель
Сommit
2b4119019e

+ 1 - 8
src/main/java/com/mokasz/image_pool/restful/controller/ImageController.java

@@ -1,6 +1,5 @@
 package com.mokasz.image_pool.restful.controller;
 
-import com.mokasz.image_pool.algorithm.FeatureExtractor;
 import com.mokasz.image_pool.algorithm.OpenCvService;
 import com.mokasz.image_pool.restful.entity.ImageQueryResponse;
 import com.mokasz.image_pool.restful.entity.ImageSaveResponse;
@@ -28,12 +27,6 @@ public class ImageController {
     return new ImageSaveResponse("ok", 0);
   }
 
-  @PostMapping("/store2")
-  public ImageSaveResponse store2(@RequestParam("file") MultipartFile file) throws IOException {
-    FeatureExtractor.compute(file.getBytes());
-    return new ImageSaveResponse("OK", 1L);
-  }
-
   @PostMapping("/store")
   public ImageSaveResponse store(
       @RequestParam("file") MultipartFile file, @RequestParam("pool") int pool) throws IOException {
@@ -54,7 +47,7 @@ public class ImageController {
         "INSERT INTO image_pool.image_to_pool VALUES (?, ?, NOW()) ON CONFLICT (hash, pool_id) DO NOTHING",
         hash,
         pool);
-    return new ImageSaveResponse(hash, 1L);
+    return new ImageSaveResponse(hash, pool);
   }
 
   @PostMapping("/match")

+ 1 - 1
src/main/java/com/mokasz/image_pool/restful/entity/ImageSaveResponse.java

@@ -5,5 +5,5 @@ import lombok.Data;
 @Data
 public class ImageSaveResponse {
     private final String hash;
-    private final long copies;
+    private final int pool_id;
 }