fix nas add

This commit is contained in:
Ibnu Maksum 2024-07-10 16:02:04 +07:00
parent c31601581f
commit d042879812
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5

View File

@ -57,8 +57,7 @@ switch ($action) {
}
if ($msg == '') {
require_once $DEVICE_PATH . DIRECTORY_SEPARATOR . "Radius.php";
(new Radius())->nasAdd($shortname, $nasname, $ports, $secret, $routers, $description, $type, $server, $community);
if ($id > 0) {
if ((new Radius())->nasAdd($shortname, $nasname, $ports, $secret, $routers, $description, $type, $server, $community) > 0) {
r2(U . 'radius/nas-list/', 's', "NAS Added");
} else {
r2(U . 'radius/nas-add/', 'e', "NAS Added Failed");