now the ports cannot be assigned twice, also simmilar application names work
This commit is contained in:
parent
e5300424ef
commit
e9d1f985ae
7 changed files with 57 additions and 106 deletions
|
@ -297,13 +297,13 @@
|
|||
return;
|
||||
}
|
||||
|
||||
const response = await fetch(`/api/servers/${serverId}/suggest_port`);
|
||||
const response = await fetch(`/api/server/${serverId}/free-port`);
|
||||
const data = await response.json();
|
||||
|
||||
if (data.port) {
|
||||
if (data.success && data.port) {
|
||||
addPortRow(data.port);
|
||||
} else {
|
||||
showNotification('No available ports found', 'warning');
|
||||
showNotification(data.error || 'No available ports found', 'warning');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error generating random port:', error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue