mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 18:38:22 +00:00
Correct wireguard rpc calls
This commit is contained in:
parent
a9b99899c0
commit
7ef66c772f
3 changed files with 5 additions and 5 deletions
|
@ -31,7 +31,7 @@ const displayData = $computed(() => {
|
|||
|
||||
async function load(){
|
||||
loading = true;
|
||||
let res = await apiCall('cpn.get_wireguard_interfaces', {});
|
||||
let res = await apiCall('vpn.wireguard.get_interfaces', {});
|
||||
if (res.Error === null) {
|
||||
console.debug('interfaces', res.Data);
|
||||
interfaces = res.Data;
|
||||
|
@ -42,7 +42,7 @@ async function load(){
|
|||
}
|
||||
|
||||
async function deleteInterface(){
|
||||
let res = await apiCall('vpn.delete_wireguard_interface', {name: displayData[selection[0]].name});
|
||||
let res = await apiCall('vpn.wireguard_delete_interface', {name: displayData[selection[0]].name});
|
||||
if (res.Error === null) {
|
||||
console.debug('deleted interface');
|
||||
} else {
|
||||
|
|
|
@ -32,7 +32,7 @@ const displayData = $computed(() => {
|
|||
|
||||
async function load(){
|
||||
loading = true;
|
||||
let res = await apiCall('vpn.get_wireguard_peers', {});
|
||||
let res = await apiCall('vpn.wireguard.get_peers', {});
|
||||
if (res.Error === null) {
|
||||
console.debug('peers', res.Data);
|
||||
peers = res.Data;
|
||||
|
@ -43,7 +43,7 @@ async function load(){
|
|||
}
|
||||
|
||||
async function deletePeer(){
|
||||
let res = await apiCall('vpn.delete_wireguard_peer', {name: displayData[selection[0]].name});
|
||||
let res = await apiCall('vpn.wireguard.delete_peer', {name: displayData[selection[0]].name});
|
||||
if (res.Error === null) {
|
||||
console.debug('deleted peer');
|
||||
} else {
|
||||
|
|
|
@ -6,7 +6,7 @@ let loading = $ref(false);
|
|||
|
||||
async function load() {
|
||||
loading = true;
|
||||
let res = await apiCall('vpn.get_wireguard_status', {});
|
||||
let res = await apiCall('vpn.wireguard.get_status', {});
|
||||
if (res.Error === null) {
|
||||
console.debug('status', res.Data);
|
||||
status = res.Data;
|
||||
|
|
Loading…
Add table
Reference in a new issue