1
0
mirror of https://github.com/ArcticFoxes-net/ONC-Converter synced 2024-09-19 08:04:43 -04:00

Rename function to make code clearer

This commit is contained in:
thomkeh 2018-07-15 12:04:01 +01:00 committed by GitHub
parent f5eed6c07a
commit e9ce07a414
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,7 @@
for (const certificateFile of certificateFiles) {
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)
}
@ -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 {Object} ovpn The parsed OVPN file
* @param {Object} keys Strings with keys, indexed by key name
* @return {Object} The converted ONC structure
*/
function convert (name, ovpn, keys) {
function constructOnc (name, ovpn, keys) {
if (!ovpn.client) {
console.warn('Is this a server file?')
}