use of org.springframework.web.bind.annotation.DeleteMapping in project av-service by dvoraka.
the class FileController method deleteFile.
@DeleteMapping("/{filename}")
public ResponseEntity<Void> deleteFile(@PathVariable String filename, Principal principal) {
log.debug("Delete file: {}, principal: {}", filename, principal);
AvMessage fileRequest = new DefaultAvMessage.Builder(Utils.genUuidString()).filename(filename).owner(principal.getName()).type(MessageType.FILE_DELETE).build();
restService.deleteFile(fileRequest);
return new ResponseEntity<>(HttpStatus.OK);
}
Aggregations