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