RENAME ClipConfig entity to VideoMetadata

This commit is contained in:
2025-05-20 12:07:25 +02:00
parent e7466800ae
commit b09577fc81
6 changed files with 25 additions and 28 deletions

View File

@@ -1,6 +1,6 @@
package com.ddf.vodsystem.controllers;
import com.ddf.vodsystem.entities.ClipConfig;
import com.ddf.vodsystem.entities.VideoMetadata;
import com.ddf.vodsystem.services.EditService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
@@ -18,8 +18,8 @@ public class EditController {
}
@PostMapping("edit/{uuid}")
public ResponseEntity<String> edit(@PathVariable("uuid") String uuid, @ModelAttribute ClipConfig clipConfig) {
editService.edit(uuid, clipConfig);
public ResponseEntity<String> edit(@PathVariable("uuid") String uuid, @ModelAttribute VideoMetadata videoMetadata) {
editService.edit(uuid, videoMetadata);
return new ResponseEntity<>(uuid, HttpStatus.OK);
}

View File

@@ -4,14 +4,11 @@ import com.ddf.vodsystem.services.UploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@RestController
@RequestMapping("api/v1/")
@RequestMapping("api/v1/upload")
public class UploadController {
private final UploadService uploadService;
@@ -21,7 +18,7 @@ public class UploadController {
this.uploadService = uploadService;
}
@PostMapping("/upload")
@PostMapping("/")
public ResponseEntity<String> uploadVideo(@RequestParam("file") MultipartFile file) {
String uuid = uploadService.upload(file);