Update frontend
This commit is contained in:
2
frontend
2
frontend
Submodule frontend updated: 630ceb9241...07607d9464
@@ -56,7 +56,6 @@ public class PatternController {
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public PatternDto addPattern(@RequestBody PatternCreateDto dto) {
|
public PatternDto addPattern(@RequestBody PatternCreateDto dto) {
|
||||||
return service.create(dto);
|
return service.create(dto);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/{id}")
|
@PostMapping("/{id}")
|
||||||
|
|||||||
@@ -90,6 +90,10 @@ public class ServicesService {
|
|||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public ServiceDto create(ServiceCreateDto dto) {
|
public ServiceDto create(ServiceCreateDto dto) {
|
||||||
|
if (repository.existsById(dto.getPort())) {
|
||||||
|
throw new IllegalArgumentException("Service already exists");
|
||||||
|
}
|
||||||
|
|
||||||
CtfService service = fromDto(dto);
|
CtfService service = fromDto(dto);
|
||||||
|
|
||||||
log.info("Added service '{}' at port {}", service.getName(), service.getPort());
|
log.info("Added service '{}' at port {}", service.getName(), service.getPort());
|
||||||
|
|||||||
Reference in New Issue
Block a user