Api params

This commit is contained in:
BuildTools
2020-11-04 17:23:29 +01:00
parent 4818905422
commit 6a7fc03e7c
6 changed files with 18 additions and 7 deletions

View File

@ -21,6 +21,7 @@ import org.springframework.web.multipart.MultipartFile;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@RestController
@CrossOrigin
@ -35,7 +36,8 @@ public class ConfigController {
@PostMapping("/config")
@PreAuthorize("hasRole('ROLE_ADMIN')")
@ApiOperation("Imports data to system. To call you need to provide ADMIN token")
public ResponseEntity<String> configApp(@RequestParam("file") MultipartFile file) {
public ResponseEntity<String> configApp(
@RequestParam("file") @ApiParam(value = "file .xlsx that contains courses and groups with apoinnted rules") MultipartFile file) {
try {
final ConfigData data = new ConfigData(null, null, file.getInputStream());
this.contrl.config(data);