mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Delete GenerateController.java
This commit is contained in:
parent
3bbd82eddc
commit
15a4807567
@@ -1,26 +0,0 @@
|
|||||||
package com.v2d.document.controller;
|
|
||||||
|
|
||||||
import com.v2d.document.service.ExternalApiService;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/api/generate")
|
|
||||||
public class GenerateController {
|
|
||||||
|
|
||||||
private final ExternalApiService externalApiService;
|
|
||||||
|
|
||||||
public GenerateController(ExternalApiService externalApiService) {
|
|
||||||
this.externalApiService = externalApiService;
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping
|
|
||||||
public ResponseEntity<String> generate(@RequestBody Map<String,Object> body) {
|
|
||||||
// Build provider payload from the user's body (transform safely)
|
|
||||||
String payload = "{\"text\": \"use this text\"}"; // adapt for real usage
|
|
||||||
String providerResponse = externalApiService.callProvider(payload);
|
|
||||||
return ResponseEntity.ok(providerResponse);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user