Add delete files method

This commit is contained in:
Maksim Tereshin 2024-12-28 11:41:21 +01:00
parent 159da1d9a9
commit d288e7e4b4
No known key found for this signature in database
2 changed files with 9 additions and 0 deletions

View file

@ -55,6 +55,14 @@ public class ApiController {
return ResponseEntity.ok("Операция \"Удаление повесток\" завершена успешно.");
}
@PostMapping("/deleteFiles")
public ResponseEntity<?> deleteFiles(@RequestBody List<String> ids) throws FileNotFoundException {
apiService.process(ConfigType.DELETE_FILES, ids);
return ResponseEntity.ok("Операция \"Удаление файлов\" завершена успешно.");
}
@PostMapping("/block")
public ResponseEntity<?> block(@RequestBody List<String> ids) throws SQLException, FileNotFoundException {
validationService.validateAll(ids);

View file

@ -6,6 +6,7 @@ import lombok.Getter;
public enum ConfigType {
BLOCK("block"),
DELETE_FILES("deleteFiles"),
UNBLOCK("unblock"),
REMOVE_FROM_SYSTEM("removeFromSystem"),
REMOVE_FROM_CALL_LIST("removeFromCallList"),