|
|
@@ -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")
|