mirror of
https://github.com/ArcticFoxes-net/ONC-Converter
synced 2025-02-01 18:52:03 -05:00
Rename function to make code clearer
This commit is contained in:
parent
f5eed6c07a
commit
e9ce07a414
@ -58,7 +58,7 @@
|
|||||||
for (const certificateFile of certificateFiles) {
|
for (const certificateFile of certificateFiles) {
|
||||||
keys[certificateFile.name] = await readFile(certificateFile)
|
keys[certificateFile.name] = await readFile(certificateFile)
|
||||||
}
|
}
|
||||||
let onc = convert(connName, ovpn, keys)
|
let onc = constructOnc(connName, ovpn, keys)
|
||||||
output.value = JSON.stringify(onc, null, 2)
|
output.value = JSON.stringify(onc, null, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,14 +202,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert the parsed OVPN file to ONC structure
|
* Construct the ONC structure from the name, the parsed ovpn file and the keys
|
||||||
*
|
*
|
||||||
* @param {string} name Name of the connection
|
* @param {string} name Name of the connection
|
||||||
* @param {Object} ovpn The parsed OVPN file
|
* @param {Object} ovpn The parsed OVPN file
|
||||||
* @param {Object} keys Strings with keys, indexed by key name
|
* @param {Object} keys Strings with keys, indexed by key name
|
||||||
* @return {Object} The converted ONC structure
|
* @return {Object} The converted ONC structure
|
||||||
*/
|
*/
|
||||||
function convert (name, ovpn, keys) {
|
function constructOnc (name, ovpn, keys) {
|
||||||
if (!ovpn.client) {
|
if (!ovpn.client) {
|
||||||
console.warn('Is this a server file?')
|
console.warn('Is this a server file?')
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user