Add delete files method
This commit is contained in:
parent
159da1d9a9
commit
d288e7e4b4
2 changed files with 9 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue