feat: load configuration from file
* import json config file & update the config (restore) * export the config and save it to json file (backup)
This commit is contained in:
@@ -138,4 +138,19 @@ class API {
|
||||
});
|
||||
}
|
||||
|
||||
async uploadConfiguration(file) {
|
||||
return this.call({
|
||||
method: 'put',
|
||||
path: `/wireguard/upload`,
|
||||
body: { file }
|
||||
});
|
||||
}
|
||||
|
||||
async downloadConfiguration() {
|
||||
return this.call({
|
||||
method: 'get',
|
||||
path: `/wireguard/dl`,
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user